GNOME Bugzilla – Bug 655361
pcapparse: fix SLL parsing
Last modified: 2011-07-27 09:44:19 UTC
Created attachment 192681 [details] [review] Proposed patch The current code is not checking for ethernet type, as it's supposed to, but link layer device type and it's hard-coded to only accept dumps from ethernet (ARPHRD_ETHER; 1). We don't care where the dump was fetched from (wlan, 3G, etc.) What we care about is the that the ethernet type is IP (ETHERNET_IP; 0x800), which is clearly field 14: http://www.tcpdump.org/pcap3_man.html And do a bit of cleanup.
Review of attachment 192681 [details] [review]: If it works fine, patch looks ok to me
Thanks. commit 046af98b301396570488a56443fdd1d8c5aacd79 Author: Felipe Contreras <felipe.contreras@nokia.com> Date: Tue Jul 26 19:11:16 2011 +0300 pcapparse: fix SLL parsing The current code is not checking for ethernet type, as it's supposed to, but link layer device type and it's hard-coded to only accept dumps from ethernet (ARPHRD_ETHER; 1). We don't care where the dump was fetched from (wlan, 3G, etc.) What we care about is the that the ethernet type is IP (ETHERNET_IP; 0x800), which is clearly field 14: http://www.tcpdump.org/pcap3_man.html And do a bit of cleanup. Signed-off-by: Felipe Contreras <felipe.contreras@nokia.com>