ether_demux does not handle frames with embedded vlan tags

Ryan Stone rysto32 at gmail.com
Wed Oct 19 21:47:25 UTC 2011


On Wed, Oct 19, 2011 at 3:30 PM, Juli Mallett <jmallett at freebsd.org> wrote:
> Why should the requirements for the Netgraph path be any different to
> the non-Netgraph path?  If drivers must ensure that frames that reach
> ether_demux have had their VLAN tags stripped, so should Netgraph
> things that act like drivers.  So why don't you move that logic into
> ether_demux from the ether_input path, or have Netgraph use the
> ether_input path?

Netgraph can't use the ether_input path because ether_input passes the
packet to the lower hook.  It also passes the packet to things like
carp or if_bridge if necessary.  I'm not sure whether it is intended
behaviour that the upper hook bypasses carp and if_bridge.

if_bridge also depends on the vlan stripping behaviour, so vlan
stripping cannot be moved to ether_demux without re-implementing it in
bridge_input.


More information about the freebsd-net mailing list