]> git.baikalelectronics.ru Git - kernel.git/commit
bridge: Check if vlan filtering is enabled only once.
authorVlad Yasevich <vyasevich@gmail.com>
Fri, 12 Sep 2014 20:26:16 +0000 (16:26 -0400)
committerDavid S. Miller <davem@davemloft.net>
Sat, 13 Sep 2014 21:21:56 +0000 (17:21 -0400)
commit71032f30846c710c08b70c4e6bea40d9ab7058ee
tree9a3a341354ecc5645ac36c583aa71b7beaba9f27
parentf7a41d5efd7ba004524355df7e4eb4b859ab2235
bridge: Check if vlan filtering is enabled only once.

The bridge code checks if vlan filtering is enabled on both
ingress and egress.   When the state flip happens, it
is possible for the bridge to currently be forwarding packets
and forwarding behavior becomes non-deterministic.  Bridge
may drop packets on some interfaces, but not others.

This patch solves this by caching the filtered state of the
packet into skb_cb on ingress.  The skb_cb is guaranteed to
not be over-written between the time packet entres bridge
forwarding path and the time it leaves it.  On egress, we
can then check the cached state to see if we need to
apply filtering information.

Signed-off-by: Vladislav Yasevich <vyasevic@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br_private.h
net/bridge/br_vlan.c