bridge: mdb: add/del entry on all vlans if vlan_filter is enabled and vid is 0
authorSatish Ashok <sashok@cumulusnetworks.com>
Mon, 3 Aug 2015 11:29:16 +0000 (13:29 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 3 Aug 2015 22:43:35 +0000 (15:43 -0700)
commite44deb2f0cce9183ca94d14effd4170a35eec31d
treea95e73acd81b76f1104edc37d0c3a82b08fceab5
parent0edc535e96621e41e2d3e7c240e68524d1968807
bridge: mdb: add/del entry on all vlans if vlan_filter is enabled and vid is 0

Before this patch when a vid was not specified, the entry was added with
vid 0 which is useless when vlan_filtering is enabled. This patch makes
the entry to be added on all configured vlans when vlan filtering is
enabled and respectively deleted from all, if the entry vid is 0.
This is also closer to the way fdb works with regard to vid 0 and vlan
filtering.

Example:
Setup:
$ bridge vlan add vid 256 dev eth4
$ bridge vlan add vid 1024 dev eth4
$ bridge vlan add vid 64 dev eth3
$ bridge vlan add vid 128 dev eth3
$ bridge vlan
port vlan ids
eth3  1 PVID Egress Untagged
 64
 128

eth4  1 PVID Egress Untagged
 256
 1024
$ echo 1 > /sys/class/net/br0/bridge/vlan_filtering

Before:
$ bridge mdb add dev br0 port eth3 grp 239.0.0.1
$ bridge mdb
dev br0 port eth3 grp 239.0.0.1 temp

After:
$ bridge mdb add dev br0 port eth3 grp 239.0.0.1
$ bridge mdb
dev br0 port eth3 grp 239.0.0.1 temp vid 1
dev br0 port eth3 grp 239.0.0.1 temp vid 128
dev br0 port eth3 grp 239.0.0.1 temp vid 64

Signed-off-by: Satish Ashok <sashok@cumulusnetworks.com>
Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br_mdb.c
This page took 0.026421 seconds and 5 git commands to generate.