]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
vlan: Calling vlan_hwaccel_do_receive() is always valid.
authorJesse Gross <jesse@nicira.com>
Thu, 21 Oct 2010 11:30:42 +0000 (11:30 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 22 Oct 2010 02:59:31 +0000 (19:59 -0700)
It is now acceptable to receive vlan tagged packets at any time,
even if CONFIG_VLAN_8021Q is not set.  This means that calling
vlan_hwaccel_do_receive() should not result in BUG() but rather just
behave as if there were no vlan devices configured.

Reported-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/if_vlan.h

index a0d9786c202dac16ad01f1766379f7e269c51751..c2f3a72712cec86a63699690096b928f1a1db6a2 100644 (file)
@@ -168,7 +168,8 @@ static inline int __vlan_hwaccel_rx(struct sk_buff *skb, struct vlan_group *grp,
 
 static inline bool vlan_hwaccel_do_receive(struct sk_buff **skb)
 {
-       BUG();
+       if ((*skb)->vlan_tci & VLAN_VID_MASK)
+               (*skb)->pkt_type = PACKET_OTHERHOST;
        return false;
 }