From 0988c4c7fb5881377ec20a6452f739a722e97c6b Mon Sep 17 00:00:00 2001 From: Jesse Gross Date: Thu, 21 Oct 2010 11:30:42 +0000 Subject: vlan: Calling vlan_hwaccel_do_receive() is always valid. 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 Signed-off-by: Jesse Gross Signed-off-by: David S. Miller --- include/linux/if_vlan.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/linux/if_vlan.h') diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h index a0d9786c202d..c2f3a72712ce 100644 --- a/include/linux/if_vlan.h +++ b/include/linux/if_vlan.h @@ -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; } -- cgit v1.2.3