lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1438643998-9259-1-git-send-email-razor@blackwall.org>
Date:	Tue,  4 Aug 2015 01:19:58 +0200
From:	Nikolay Aleksandrov <razor@...ckwall.org>
To:	netdev@...r.kernel.org
Cc:	davem@...emloft.net, bridge@...ts.linux-foundation.org,
	stephen@...workplumber.org,
	Nikolay Aleksandrov <nikolay@...ulusnetworks.com>
Subject: [PATCH net-next] bridge: mdb: fix vlan_enabled access when vlans are not configured

From: Nikolay Aleksandrov <nikolay@...ulusnetworks.com>

Instead of trying to access br->vlan_enabled directly use the provided
helper br_vlan_enabled().

Signed-off-by: Nikolay Aleksandrov <nikolay@...ulusnetworks.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

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ