From: Nikolay Aleksandrov <razor@blackwall.org>
To: netdev@vger.kernel.org
Cc: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>,
bridge@lists.linux-foundation.org, davem@davemloft.net
Subject: [PATCH net-next] bridge: mdb: fix vlan_enabled access when vlans are not configured
Date: Tue, 4 Aug 2015 01:19:58 +0200 [thread overview]
Message-ID: <1438643998-9259-1-git-send-email-razor@blackwall.org> (raw)
In-Reply-To: <201508040606.8x0wKgcJ%fengguang.wu@intel.com>
From: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Instead of trying to access br->vlan_enabled directly use the provided
helper br_vlan_enabled().
Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
---
Sorry, forgot to change this before sending the patch.
net/bridge/br_mdb.c | 4 ++--
1 file 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);
--
2.4.3
next prev parent reply other threads:[~2015-08-03 23:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-03 22:55 [net-next:master 173/173] net/bridge/br_mdb.c:493:8: error: 'struct net_bridge' has no member named 'vlan_enabled' kbuild test robot
2015-08-03 23:19 ` Nikolay Aleksandrov [this message]
2015-08-03 23:21 ` [PATCH net-next] bridge: mdb: fix vlan_enabled access when vlans are not configured David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1438643998-9259-1-git-send-email-razor@blackwall.org \
--to=razor@blackwall.org \
--cc=bridge@lists.linux-foundation.org \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=nikolay@cumulusnetworks.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).