From: Vlad Yasevich Date: Mon, 15 Sep 2014 19:24:26 +0000 (-0400) Subject: bridge: Fix br_should_learn to check vlan_enabled X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=c095f248e63ada504dd90c90baae673ae10ee3fe;p=openwrt%2Fstaging%2Fblogic.git bridge: Fix br_should_learn to check vlan_enabled 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 Fixes: 20adfa1 bridge: Check if vlan filtering is enabled only once. Signed-off-by: Vladislav Yasevich Signed-off-by: David S. Miller --- diff --git a/net/bridge/br_vlan.c b/net/bridge/br_vlan.c index 4b86738eca9a..3ba57fcdcd13 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);