summaryrefslogtreecommitdiff
path: root/net/bridge
diff options
context:
space:
mode:
authorNikolay Aleksandrov <nikolay@cumulusnetworks.com>2015-08-04 02:19:58 +0300
committerDavid S. Miller <davem@davemloft.net>2015-08-04 02:20:51 +0300
commit58da018053531b9cb91423a64f2a762ef0fe7456 (patch)
tree5c3535d041305b5e6395765d2769b58679ce05f2 /net/bridge
parenta5c90b29e5ccdb90922b808fd4831cfbaa63006c (diff)
downloadlinux-58da018053531b9cb91423a64f2a762ef0fe7456.tar.xz
bridge: mdb: fix vlan_enabled access when vlans are not configured
Instead of trying to access br->vlan_enabled directly use the provided helper br_vlan_enabled(). Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge')
-rw-r--r--net/bridge/br_mdb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/bridge/br_mdb.c b/net/bridge/br_mdb.c
index 1df3ef4a73b9..d747275fad18 100644
--- a/net/bridge/br_mdb.c
+++ b/net/bridge/br_mdb.c
@@ -490,7 +490,7 @@ static int br_mdb_add(struct sk_buff *skb, struct nlmsghdr *nlh)
return -EINVAL;
pv = nbp_get_vlan_info(p);
- if (br->vlan_enabled && pv && entry->vid == 0) {
+ if (br_vlan_enabled(br) && pv && entry->vid == 0) {
for_each_set_bit(vid, pv->vlan_bitmap, VLAN_N_VID) {
entry->vid = vid;
err = __br_mdb_add(net, br, entry);
@@ -592,7 +592,7 @@ static int br_mdb_del(struct sk_buff *skb, struct nlmsghdr *nlh)
return -EINVAL;
pv = nbp_get_vlan_info(p);
- if (br->vlan_enabled && pv && entry->vid == 0) {
+ if (br_vlan_enabled(br) && pv && entry->vid == 0) {
for_each_set_bit(vid, pv->vlan_bitmap, VLAN_N_VID) {
entry->vid = vid;
err = __br_mdb_del(br, entry);