git: net - Fix vlan input packet processing w/ if_bridge, if_carp, etc

Matthew Dillon dillon at crater.dragonflybsd.org
Thu Feb 2 01:52:21 PST 2023


commit d21ca33b37704234b30af0d1d43d4c0934efcbc2
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Thu Feb 2 01:43:50 2023 -0800

    net - Fix vlan input packet processing w/ if_bridge, if_carp, etc
    
    * if_bridge does not understand VLAN-tagged packets, do not try to
      bridge such packets from the primary interface.  If the user wants
      to bridge such packets it can be done via the virtual vlan interface
      and the vlan tag can be regenerated (or not) with appropriate bridge
      groupings.
    
      This was causing unicast vlan packets to be discarded in the bridge code.
    
    * Unicast VLAN-tagged packets were not being properly bpf tapped on the
      virtual vlan interface.
    
    * Carp should operate on vlan interfaces, not the original interface, when
      presented with a VLAN-tagged packet.
    
    * Fix all of this by having ether_input_oncpu() bypass more or less directly
      to ether_demux_oncpu() when a M_VLANTAG packet is encountered.  What will
      happen is that if_vlan will issue ether_reinput_oncpu() from the
      appropriate virtual vlan interface, which ultimately re-enters
      ether_input_oncpu() without the tag.
    
      This is more along the lines of how we want vlans to be treated.  They
      really are supposed to be virtual LANs.

Summary of changes:
 sys/net/if_ethersubr.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/d21ca33b37704234b30af0d1d43d4c0934efcbc2


-- 
DragonFly BSD source repository


More information about the Commits mailing list