Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c095f248 authored by Vlad Yasevich's avatar Vlad Yasevich Committed by David S. Miller
Browse files

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: default avatarToshiaki <Makita&lt;toshiaki.makita1@gmail.com>
Fixes: 20adfa1a bridge: Check if vlan filtering is enabled only once.
Signed-off-by: default avatarVladislav Yasevich <vyasevic@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7ce64c79
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -280,7 +280,7 @@ bool br_should_learn(struct net_bridge_port *p, struct sk_buff *skb, u16 *vid)
	struct net_port_vlans *v;
	struct net_port_vlans *v;


	/* If filtering was disabled at input, let it pass. */
	/* If filtering was disabled at input, let it pass. */
	if (!BR_INPUT_SKB_CB(skb)->vlan_filtered)
	if (!br->vlan_enabled)
		return true;
		return true;


	v = rcu_dereference(p->vlan_info);
	v = rcu_dereference(p->vlan_info);