Hello!
Im creating a software to sniff/inject packets by
While I can inject even the wildest packets (including single and dual layer VLANs), and receive all packets, the receive side somewhere strips one layer of VLAN information:
If that matters, current tests are performed on
Do I need to set some extra flags somewhere to allow VLAN passthrough?
Im creating a software to sniff/inject packets by
netgraph
subsystem (test rig for some embedded device). Just a simple ng_socket
attached to ng_ether
's lower
hook. A simple sudo nghook epair3a: lower | hexdump -C
has the same behavior.While I can inject even the wildest packets (including single and dual layer VLANs), and receive all packets, the receive side somewhere strips one layer of VLAN information:
- for simple VLAN I get untagged packet (0x8100:VLAN>PROTO is read as bare PROTO)
- for Q-in-Q I get single-tagged packet with internal VLAN only (0x88a8:OVLAN>0x8100:IVLAN>PROTO is read as 0x8100:IVLAN/PROTO)
tcpdump
confirms all the necessary fields. It is just the receiving side that gets somehow de-tagged.If that matters, current tests are performed on
epair
virtual Ethernet card pair (one card is injecting, the other is capturing).Do I need to set some extra flags somewhere to allow VLAN passthrough?