Skip to content

Commit

Permalink
bridge: Fix br_should_learn to check vlan_enabled
Browse files Browse the repository at this point in the history
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Vlad Yasevich authored and David S. Miller committed Sep 15, 2014
1 parent 7ce64c7 commit c095f24
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/bridge/br_vlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit c095f24

Please sign in to comment.