]> err.no Git - linux-2.6/commitdiff
[VLAN]: Kill useless check
authorPatrick McHardy <kaber@trash.net>
Mon, 21 Jan 2008 08:22:30 +0000 (00:22 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jan 2008 23:08:27 +0000 (15:08 -0800)
vlan->real_dev is always equal to the device since thats what we used
for the lookup. It doesn't even seem worth a WARN_ON or BUG_ON.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/8021q/vlan_dev.c

index 51ce4217c039f47568aafa4be369b86d8042bc27..50d8edcbb89739189501855f71691148900b6021 100644 (file)
@@ -181,24 +181,6 @@ int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev,
        /* Take off the VLAN header (4 bytes currently) */
        skb_pull_rcsum(skb, VLAN_HLEN);
 
-       /* Ok, lets check to make sure the device (dev) we
-        * came in on is what this VLAN is attached to.
-        */
-
-       if (dev != VLAN_DEV_INFO(skb->dev)->real_dev) {
-               rcu_read_unlock();
-
-#ifdef VLAN_DEBUG
-               printk(VLAN_DBG "%s: dropping skb: %p because came in on wrong device, dev: %s  real_dev: %s, skb_dev: %s\n",
-                       __FUNCTION__, skb, dev->name,
-                       VLAN_DEV_INFO(skb->dev)->real_dev->name,
-                       skb->dev->name);
-#endif
-               kfree_skb(skb);
-               stats->rx_errors++;
-               return -1;
-       }
-
        /*
         * Deal with ingress priority mapping.
         */