summaryrefslogtreecommitdiff
path: root/net/tcptrace/files/patch-tcpdump.h.diff
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2005-07-13 18:02:26 +0000
committerPav Lucistnik <pav@FreeBSD.org>2005-07-13 18:02:26 +0000
commitfa80014180872977a3e11add4ae53dcf60f6ba1f (patch)
tree959841612e0b2c604a1d83c467e2e282a6ce79a1 /net/tcptrace/files/patch-tcpdump.h.diff
parent- Update to 2005.07.03 (diff)
- Update to 6.6.7
PR: ports/80665 Submitted by: Vasil Dimov <vd@datamax.bg> Approved by: maintainer timeout (2 months)
Notes
Notes: svn path=/head/; revision=139104
Diffstat (limited to 'net/tcptrace/files/patch-tcpdump.h.diff')
-rw-r--r--net/tcptrace/files/patch-tcpdump.h.diff34
1 files changed, 34 insertions, 0 deletions
diff --git a/net/tcptrace/files/patch-tcpdump.h.diff b/net/tcptrace/files/patch-tcpdump.h.diff
new file mode 100644
index 000000000000..f64859705096
--- /dev/null
+++ b/net/tcptrace/files/patch-tcpdump.h.diff
@@ -0,0 +1,34 @@
+--- tcpdump.h.orig Thu May 5 18:41:37 2005
++++ tcpdump.h Thu May 5 18:41:53 2005
+@@ -179,7 +179,7 @@
+ }
+
+ /* This function determine the offset for the IP packet in an Ethernet frame */
+-/* We handle two cases : straight Ethernet encapsulation or PPPoE encapsulation */
++/* We handle three cases : straight Ethernet, PPPoE, or .1q VLAN encapsulation */
+ /* Written by Yann Samama (ysamama@nortelnetworks.com) on july 18th, 2003 */
+ static int find_ip_eth(char* buf)
+ {
+@@ -192,16 +192,19 @@
+ switch (eth_proto_type)
+ {
+ case ETHERTYPE_IPV6: /* it's pure IPv6 over ethernet */
+- offset = 14;
+- break;
++ /* FALLTHROUGH */
+ case ETHERTYPE_IP: /* it's pure IPv4 over ethernet */
+- offset = 14;
++ offset = sizeof(struct ether_header);
+ break;
+ case ETHERTYPE_PPPOE_SESSION: /* it's a PPPoE session */
+ memcpy(&ppp_proto_type, buf+20, 2);
+ ppp_proto_type = ntohs(ppp_proto_type);
+ if (ppp_proto_type == 0x0021) /* it's IP over PPPoE */
+ offset = PPPOE_SIZE;
++ break;
++ case ETHERTYPE_VLAN:
++ offset = sizeof(struct ether_header) +
++ ETHER_VLAN_ENCAP_LEN;
+ break;
+ default: /* well, this is not an IP packet */
+ offset = -1;