A question about netgraph and vlans in general.

Julian Elischer julian at freebsd.org
Fri Dec 17 06:15:09 UTC 2010


There is a sort of confusion in the kernel and in netgraph I see as to
whether a vlan packet has a vlan header on it or has a M_VLANTAG tag 
on it.
For example the ng_vlan netgraph node prepends a real vlan header, and if
it were to be handed an mbuf with a M_VLANTAG associated with it, it would
ignore it, leaving a packet with both. (maybe useful for QinQ except
the order is probably opposite what one would want or expect).

Is there possibility that it (the vlan node) should simply add a 
M_VLANTAG and
let it be handled downstream?  and what happens if there is already a 
vlan tag?
should teh vlan tag be converted into a header and a new vlan tag added
with the new value?

I ask this after prodding with PR 152141 which is to do with vlan 
encapsulation
for ng_ether. During my investigation of the bug, looking to see what was
done elsewhere it seemed that it was a little confusing..


Julian




More information about the freebsd-net mailing list