packetnet icon indicating copy to clipboard operation
packetnet copied to clipboard

EthernetPacket.ParseNextSegment() does not recognize 802.1ad VLAN tag

Open rlebeau opened this issue 4 years ago • 1 comments

An 802.1ad (EthernetPacketType.ProviderBridging) VLAN tag is just an 802.1Q (EthernetPacketType.VLanTaggedFrame) VLAN tag with a TPID value of 0x88a8 rather than 0x8100.

When EthernetPacket.ParseNextSegment() is parsing the Ethernet payload data to set the PayloadPacket property, it creates an Ieee8021QPacket object for an 802.1Q tag, but not for an 802.1ad tag, thus the PayloadPacket ends up being set to null.

I suggest setting the PayloadPacket to an Ieee8021QPacket for an 802.1ad tag. Maybe even create a new Ieee8021ADPacket class that derives from Ieee8021QPacket.

rlebeau avatar Sep 11 '20 01:09 rlebeau

HI @rlebeau. Thank you for reporting the issue. I'm not sure anyone will pick up fixing this, however we do wish it were fixed. If you do end up fixing the issue in Packet.Net could you open a pull request with a test that fails and the code fix that corrects it?

chmorgan avatar Sep 20 '20 21:09 chmorgan