bridge: Support 802.1ad vlan filtering
authorToshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
Tue, 10 Jun 2014 11:59:25 +0000 (20:59 +0900)
committerDavid S. Miller <davem@davemloft.net>
Wed, 11 Jun 2014 22:22:53 +0000 (15:22 -0700)
commit204177f3f30c2dbd2db0aa62b5e9cf9029786450
tree906cf482a40b1aaa120f2be009a0a959a9e48608
parentf2808d226f4efe15a0ea44697a3525176d6c8eae
bridge: Support 802.1ad vlan filtering

This enables us to change the vlan protocol for vlan filtering.
We come to be able to filter frames on the basis of 802.1ad vlan tags
through a bridge.

This also changes br->group_addr if it has not been set by user.
This is needed for an 802.1ad bridge.
(See IEEE 802.1Q-2011 8.13.5.)

Furthermore, this sets br->group_fwd_mask_required so that an 802.1ad
bridge can forward the Nearest Customer Bridge group addresses except
for br->group_addr, which should be passed to higher layer.

To change the vlan protocol, write a protocol in sysfs:
# echo 0x88a8 > /sys/class/net/br0/bridge/vlan_protocol

Signed-off-by: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br_private.h
net/bridge/br_sysfs_br.c
net/bridge/br_vlan.c