summaryrefslogtreecommitdiffstats
path: root/net/bridge/br_if.c
diff options
context:
space:
mode:
authorVlad Yasevich <vyasevich@gmail.com>2014-10-03 11:29:18 -0400
committerDavid S. Miller <davem@davemloft.net>2014-10-05 21:21:37 -0400
commit5be5a2df40f005ea7fb7e280e87bbbcfcf1c2fc0 (patch)
tree6aa782488f47684f803657acca74aa42b1303e59 /net/bridge/br_if.c
parent3df6bf45ec008942f16f1814123c4bdebcf50741 (diff)
downloadlinux-stable-5be5a2df40f005ea7fb7e280e87bbbcfcf1c2fc0.tar.gz
linux-stable-5be5a2df40f005ea7fb7e280e87bbbcfcf1c2fc0.tar.bz2
linux-stable-5be5a2df40f005ea7fb7e280e87bbbcfcf1c2fc0.zip
bridge: Add filtering support for default_pvid
Currently when vlan filtering is turned on on the bridge, the bridge will drop all traffic untill the user configures the filter. This isn't very nice for ports that don't care about vlans and just want untagged traffic. A concept of a default_pvid was recently introduced. This patch adds filtering support for default_pvid. Now, ports that don't care about vlans and don't define there own filter will belong to the VLAN of the default_pvid and continue to receive untagged traffic. This filtering can be disabled by setting default_pvid to 0. Signed-off-by: Vladislav Yasevich <vyasevic@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge/br_if.c')
-rw-r--r--net/bridge/br_if.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c
index 7b7289ca2992..ed307db7a12b 100644
--- a/net/bridge/br_if.c
+++ b/net/bridge/br_if.c
@@ -500,6 +500,9 @@ int br_add_if(struct net_bridge *br, struct net_device *dev)
if (br_fdb_insert(br, p, dev->dev_addr, 0))
netdev_err(dev, "failed insert local address bridge forwarding table\n");
+ if (nbp_vlan_init(p))
+ netdev_err(dev, "failed to initialize vlan filtering on this port\n");
+
spin_lock_bh(&br->lock);
changed_addr = br_stp_recalculate_bridge_id(br);