bridge: Implement vlan ingress/egress policy with PVID.
[linux-3.10.git] / net / bridge / br_forward.c
index 35b0671..092b20e 100644 (file)
@@ -64,6 +64,10 @@ int br_forward_finish(struct sk_buff *skb)
 
 static void __br_deliver(const struct net_bridge_port *to, struct sk_buff *skb)
 {
+       skb = br_handle_vlan(to->br, nbp_get_vlan_info(to), skb);
+       if (!skb)
+               return;
+
        skb->dev = to->dev;
 
        if (unlikely(netpoll_tx_running(to->br->dev))) {
@@ -89,6 +93,10 @@ static void __br_forward(const struct net_bridge_port *to, struct sk_buff *skb)
                return;
        }
 
+       skb = br_handle_vlan(to->br, nbp_get_vlan_info(to), skb);
+       if (!skb)
+               return;
+
        indev = skb->dev;
        skb->dev = to->dev;
        skb_forward_csum(skb);