diff options
author | Bill Fumerola <billf@FreeBSD.org> | 2004-11-18 06:44:47 +0000 |
---|---|---|
committer | Bill Fumerola <billf@FreeBSD.org> | 2004-11-18 06:44:47 +0000 |
commit | 07d3f1cebcaf28ea13d534a76d04d6c07735fba4 (patch) | |
tree | d08a84537edb8d7beb753baf6a08b8a58bcfe8cf /net/tcptrace | |
parent | c0de790bc87db69437c74a304c3d9f49c3ec2088 (diff) | |
download | ports-07d3f1cebcaf28ea13d534a76d04d6c07735fba4.tar.gz ports-07d3f1cebcaf28ea13d534a76d04d6c07735fba4.zip |
Notes
Diffstat (limited to 'net/tcptrace')
-rw-r--r-- | net/tcptrace/files/patch-ad | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/net/tcptrace/files/patch-ad b/net/tcptrace/files/patch-ad new file mode 100644 index 000000000000..5426f79eb9f0 --- /dev/null +++ b/net/tcptrace/files/patch-ad @@ -0,0 +1,50 @@ +Index: tcpdump.c +=========================================================================== +--- tcpdump.c 2004/11/17 15:20:25 #1 ++++ tcpdump.c 2004/11/17 15:20:25 +@@ -112,6 +112,9 @@ + { + case -1: /* Not an IP packet */ + return (-1); ++ case EH_SIZE + ETHER_VLAN_ENCAP_LEN: ++ memcpy(ð_header.ether_type, buf+EH_SIZE+2, 2); ++ /* FALLTHROUGH */ + case EH_SIZE: /* straight Ethernet encapsulation */ + memcpy((char *)ip_buf,buf+offset,iplen); + callback_plast = ip_buf+iplen-offset-1; +Index: tcpdump.h +=========================================================================== +--- tcpdump.h 2004/11/17 15:20:25 #1 ++++ tcpdump.h 2004/11/17 15:20:25 +@@ -178,7 +178,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) + { +@@ -191,10 +191,8 @@ + switch (eth_proto_type) + { + case ETHERTYPE_IPV6: /* it's pure IPv6 over ethernet */ +- offset = 14; +- break; + 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); +@@ -202,6 +200,10 @@ + 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; + break; |