bridge: Prevent insertion of FDB entry with disallowed vlan
authorToshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
Mon, 26 May 2014 06:15:53 +0000 (15:15 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Jun 2014 19:15:39 +0000 (15:15 -0400)
commit317d1e9c6a1c6f045b1b40e9baf60de6a3927f06
tree19a1fed17c6d2dbe69a5221d251b4e8097f0c5f7
parent1ab214eb6e840d3a4a1165a6978cff2448f97739
bridge: Prevent insertion of FDB entry with disallowed vlan

[ Upstream commit e0d7968ab6c8bce2437b36fa7f04117e333f196d ]

br_handle_local_finish() is allowing us to insert an FDB entry with
disallowed vlan. For example, when port 1 and 2 are communicating in
vlan 10, and even if vlan 10 is disallowed on port 3, port 3 can
interfere with their communication by spoofed src mac address with
vlan id 10.

Note: Even if it is judged that a frame should not be learned, it should
not be dropped because it is destined for not forwarding layer but higher
layer. See IEEE 802.1Q-2011 8.13.10.

Signed-off-by: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
Acked-by: Vlad Yasevich <vyasevic@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/bridge/br_input.c
net/bridge/br_private.h
net/bridge/br_vlan.c