af-packet: Add flag to distinguish VID 0 from no-vlan.
authorBen Greear <greearb@candelatech.com>
Wed, 1 Jun 2011 06:49:10 +0000 (06:49 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 2 Jun 2011 04:18:03 +0000 (21:18 -0700)
commita3bcc23e890a6d49d6763d9eb073d711de2e0469
treec4156e932f081dc14a514d5ab23cd43e590029cd
parent41be5a4a3668810bf3687a76c2b017bd437039e0
af-packet: Add flag to distinguish VID 0 from no-vlan.

Currently, user-space cannot determine if a 0 tcp_vlan_tci
means there is no VLAN tag or the VLAN ID was zero.

Add flag to make this explicit.  User-space can check for
TP_STATUS_VLAN_VALID || tp_vlan_tci > 0, which will be backwards
compatible. Older could would have just checked for tp_vlan_tci,
so it will work no worse than before.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/if_packet.h
net/packet/af_packet.c