diff options
-rw-r--r-- | contrib/tcpdump/print-ether.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/contrib/tcpdump/print-ether.c b/contrib/tcpdump/print-ether.c index 2c92d4f..cabbe2b 100644 --- a/contrib/tcpdump/print-ether.c +++ b/contrib/tcpdump/print-ether.c @@ -158,6 +158,13 @@ int ether_encap_print(u_short ethertype, const u_char *p, u_int length, u_int caplen) { + if (ethertype == 0x8100) { /* IEEE 802.1Q vlan tagging encapsulation */ + printf ("[vlan %d] ", ntohs(*(u_short *)p) & 0x17ff); + ethertype = ntohs(((u_short *)p)[1]); + p += 4; + length -= 4; + caplen -= 4; + } extracted_ethertype = ethertype; switch (ethertype) { |