Add support for 802.1ah (Q-in-Q).

This commit is contained in:
Seth Hall 2013-03-22 12:38:43 -04:00
parent 9caf6e4884
commit 4e99d3a606
4 changed files with 21 additions and 0 deletions

View file

@ -231,6 +231,14 @@ void PktSrc::Process()
data += get_link_header_size(datalink);
data += 4; // Skip the vlan header
pkt_hdr_size = 0;
// Check for 802.1ah (Q-in-Q) containing IP.
// Only do a second layer of vlan tag
// stripping because there is no
// specification that allows for deeper nesting.
if ( ((data[2] << 8) + data[3]) == 0x0800 )
data += 4;
break;
// PPPoE carried over the ethernet frame.