netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vladislav Yasevich <vyasevich@gmail.com>
To: netdev@vger.kernel.org
Cc: toshiaki.makita1@gmail.com, Vladislav Yasevich <vyasevic@redhat.com>
Subject: [PATCH] bridge: Fix br_should_learn to check vlan_enabled
Date: Mon, 15 Sep 2014 15:24:26 -0400	[thread overview]
Message-ID: <1410809066-4434-1-git-send-email-vyasevic@redhat.com> (raw)

As Toshiaki Makita pointed out, the BRIDGE_INPUT_SKB_CB will
not be initialized in br_should_learn() as that function
is called only from br_handle_local_finish().  That is
an input handler for link-local ethernet traffic so it perfectly
correct to check br->vlan_enabled here.

Reported-by: Toshiaki Makita<toshiaki.makita1@gmail.com>
Fixes: 20adfa1 bridge: Check if vlan filtering is enabled only once.
Signed-off-by: Vladislav Yasevich <vyasevic@redhat.com>
---
 net/bridge/br_vlan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/bridge/br_vlan.c b/net/bridge/br_vlan.c
index 4b86738..3ba57fc 100644
--- a/net/bridge/br_vlan.c
+++ b/net/bridge/br_vlan.c
@@ -280,7 +280,7 @@ bool br_should_learn(struct net_bridge_port *p, struct sk_buff *skb, u16 *vid)
 	struct net_port_vlans *v;
 
 	/* If filtering was disabled at input, let it pass. */
-	if (!BR_INPUT_SKB_CB(skb)->vlan_filtered)
+	if (!br->vlan_enabled)
 		return true;
 
 	v = rcu_dereference(p->vlan_info);
-- 
1.9.3

             reply	other threads:[~2014-09-15 19:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-15 19:24 Vladislav Yasevich [this message]
2014-09-15 21:38 ` [PATCH] bridge: Fix br_should_learn to check vlan_enabled David Miller
2014-09-16 10:40   ` Toshiaki Makita
2014-09-16 14:02     ` Toshiaki Makita
2014-09-16 16:16       ` David Miller
2014-09-16 16:05     ` 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=1410809066-4434-1-git-send-email-vyasevic@redhat.com \
    --to=vyasevich@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=toshiaki.makita1@gmail.com \
    --cc=vyasevic@redhat.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).