1
linux/net/8021q
Florian Zumbiehl 48cc32d38a vlan: don't deliver frames for unknown vlans to protocols
6a32e4f9dd made the vlan code skip marking
vlan-tagged frames for not locally configured vlans as PACKET_OTHERHOST if
there was an rx_handler, as the rx_handler could cause the frame to be received
on a different (virtual) vlan-capable interface where that vlan might be
configured.

As rx_handlers do not necessarily return RX_HANDLER_ANOTHER, this could cause
frames for unknown vlans to be delivered to the protocol stack as if they had
been received untagged.

For example, if an ipv6 router advertisement that's tagged for a locally not
configured vlan is received on an interface with macvlan interfaces attached,
macvlan's rx_handler returns RX_HANDLER_PASS after delivering the frame to the
macvlan interfaces, which caused it to be passed to the protocol stack, leading
to ipv6 addresses for the announced prefix being configured even though those
are completely unusable on the underlying interface.

The fix moves marking as PACKET_OTHERHOST after the rx_handler so the
rx_handler, if there is one, sees the frame unchanged, but afterwards,
before the frame is delivered to the protocol stack, it gets marked whether
there is an rx_handler or not.

Signed-off-by: Florian Zumbiehl <florz@florz.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-08 15:21:55 -04:00
..
Kconfig
Makefile
vlan_core.c vlan: don't deliver frames for unknown vlans to protocols 2012-10-08 15:21:55 -04:00
vlan_dev.c vlan: clean up vlan_dev_hard_start_xmit() 2012-08-14 14:33:32 -07:00
vlan_gvrp.c vlan: rename vlan_dev_info to vlan_dev_priv 2011-12-08 19:51:30 -05:00
vlan_netlink.c vlan: Stop using NLA_PUT*(). 2012-04-02 04:33:44 -04:00
vlan.c net: Fix memory leak - vlan_info struct 2012-07-10 23:32:27 -07:00
vlan.h vlan: add 802.1q netpoll support 2011-12-08 19:58:30 -05:00
vlanproc.c treewide: fix comment/printk/variable typos 2012-09-01 10:33:05 -07:00
vlanproc.h