tcpdump mailing list archives
Error in print-ospf layout?
From: click <click () spine-group org>
Date: Sat, 28 Feb 2004 00:57:22 +0100
Hi all, I tried some libnet's samples to sniffing an OSPFV2 HELLO pachet I saw something strange in the endianless: root@White-Dolphin:/home/click/libnet/sample# ./ospf_hello 192.168.0.1 192.168.0.1 192.168.0.4 libnet 1.1 OSPF Hello packet shaping[raw] Wrote 68 byte OSPF packet; check the wire. Sniffing with tcpdump (last CVS version) root@White-Dolphin:~/tcpdump# tcpdump -v -i any tcpdump: WARNING: Promiscuous mode not supported on the "any" device tcpdump: listening on any, link-type LINUX_SLL (Linux cooked), capture size 68 bytes 00:35:17.518403 IP (tos 0x0, ttl 254, id 101, offset 0, flags [DF], length: 68) White-Dolphin.spine.org > White-Dolphin.spine.org: OSPFv2, Hello (1), length: 48 Router-ID: 13.0.0.208, Area 0.238.255.192, Authentication Type: none (0) Options: [none] [|ospf] [snip] Has you can see Router-ID and Area are printed in a wrong way..... the problem is at line 841 of tcpdump/printf-ospf.c for Router-ID field, and at line 845 for Area field. I've patched temporarily print-ospf.c using intoa() and htonl() has you can see in the .diff file attached with this mail. With printf-ospf.c patched: OSPFv2, Hello (1), length: 48 Router-ID: 208.0.0.13, Area 192.255.238.0, Authentication Type: none (0) Options: [none] [|ospf] Regards Valerio 'click' Genovese -- http://www.spine-group.org
Attachment:
print-ospf_patch.diff
Description:
Current thread:
- Error in print-ospf layout? click (Feb 27)
- Re: Error in print-ospf layout? Hannes Gredler (Feb 27)
- Re: Error in print-ospf layout? click (Feb 28)
- Re: Error in print-ospf layout? click (Feb 28)
- Re: Error in print-ospf layout? click (Feb 28)
- Re: Error in print-ospf layout? Hannes Gredler (Feb 27)