Rewritten VLAN tag at ng_ether(4) and ng_socket(4) as bhyve(8) netgraph backend

From: Harry Schmalzbauer <freebsd_at_omnilan.de>
Date: Sat, 29 Mar 2025 19:28:12 UTC
Hello,

I hope my netgraph (understanding) issue/question fits to net@.

My issue:
I'm observing VLAN tagged frames reading VID=0 when received inside a 
bhyve(8) VM, while they (correctly) read VID=77 at ng_eiface(4) 
ng_bridge(4) members.

Narrowed down to be a netgraph(4) problem:
Using if_tap(4) as bhyve(8) backend instead of netgraph preserves VLAN 
tagging (tcpdump inside the otherwise same VM reads VID-77).

Blocks use case:
Having a VM with a 'trunk' port.


If anybody has an idea or is interested in some more details, please 
have a look at https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=285755


Thanks in advance,

-harry