packetnet
packetnet copied to clipboard
EthernetPacket.ParseNextSegment() does not recognize 802.1ad VLAN tag
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
.
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?