Skip to content

Commit

Permalink
vlan: Calling vlan_hwaccel_do_receive() is always valid.
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Jesse Gross <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
jessegross authored and davem330 committed Oct 22, 2010
1 parent 2198a10 commit 0988c4c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/linux/if_vlan.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 0988c4c

Please sign in to comment.