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)
committerJiri Slaby <jslaby@suse.cz>
Mon, 23 Jun 2014 08:27:58 +0000 (10:27 +0200)
commit3ed50132d6a8244a14f9896e897464c099809462
tree2489730cec4796d5044f1bb9b467608490de90e3
parentec2ab4bc695981aac49a33317c9d8b541f2babd1
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: Jiri Slaby <jslaby@suse.cz>
net/bridge/br_input.c
net/bridge/br_private.h
net/bridge/br_vlan.c