aboutsummaryrefslogtreecommitdiffstats
path: root/net/bridge/br_input.c
diff options
context:
space:
mode:
authorVlad Yasevich <vyasevic@redhat.com>2013-02-13 07:00:11 -0500
committerDavid S. Miller <davem@davemloft.net>2013-02-13 19:41:46 -0500
commit85f46c6baef1486ce20e13dd7cdea5dd15be2a90 (patch)
treeaab52d4f01320337bfc59358d26fc856e717a8f2 /net/bridge/br_input.c
parenta37b85c9fbd1dc69fbec3985763f373203eaf9e3 (diff)
bridge: Verify that a vlan is allowed to egress on given port
When bridge forwards a frame, make sure that a frame is allowed to egress on that port. Signed-off-by: Vlad Yasevich <vyasevic@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge/br_input.c')
-rw-r--r--net/bridge/br_input.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/net/bridge/br_input.c b/net/bridge/br_input.c
index 4ef3f6b17bd0..787d7dad6b7e 100644
--- a/net/bridge/br_input.c
+++ b/net/bridge/br_input.c
@@ -35,6 +35,16 @@ static int br_pass_frame_up(struct sk_buff *skb)
35 brstats->rx_bytes += skb->len; 35 brstats->rx_bytes += skb->len;
36 u64_stats_update_end(&brstats->syncp); 36 u64_stats_update_end(&brstats->syncp);
37 37
38 /* Bridge is just like any other port. Make sure the
39 * packet is allowed except in promisc modue when someone
40 * may be running packet capture.
41 */
42 if (!(brdev->flags & IFF_PROMISC) &&
43 !br_allowed_egress(br, br_get_vlan_info(br), skb)) {
44 kfree_skb(skb);
45 return NET_RX_DROP;
46 }
47
38 indev = skb->dev; 48 indev = skb->dev;
39 skb->dev = brdev; 49 skb->dev = brdev;
40 50