Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git...
[pandora-kernel.git] / net / 8021q / vlan_core.c
index 1f64cc9..f5ffc02 100644 (file)
@@ -5,7 +5,7 @@
 #include <linux/export.h>
 #include "vlan.h"
 
-bool vlan_do_receive(struct sk_buff **skbp)
+bool vlan_do_receive(struct sk_buff **skbp, bool last_handler)
 {
        struct sk_buff *skb = *skbp;
        u16 vlan_id = skb->vlan_tci & VLAN_VID_MASK;
@@ -14,7 +14,10 @@ bool vlan_do_receive(struct sk_buff **skbp)
 
        vlan_dev = vlan_find_dev(skb->dev, vlan_id);
        if (!vlan_dev) {
-               if (vlan_id)
+               /* Only the last call to vlan_do_receive() should change
+                * pkt_type to PACKET_OTHERHOST
+                */
+               if (vlan_id && last_handler)
                        skb->pkt_type = PACKET_OTHERHOST;
                return false;
        }