packet: deliver VLAN TCI to userspace
Store the VLAN tag in the auxillary data/tpacket2_hdr so userspace can properly deal with hardware VLAN tagging/stripping. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
bbd6ef87c5
commit
393e52e33c
@@ -59,6 +59,7 @@ struct tpacket_auxdata
|
||||
__u32 tp_snaplen;
|
||||
__u16 tp_mac;
|
||||
__u16 tp_net;
|
||||
__u16 tp_vlan_tci;
|
||||
};
|
||||
|
||||
struct tpacket_hdr
|
||||
@@ -90,6 +91,7 @@ struct tpacket2_hdr
|
||||
__u16 tp_net;
|
||||
__u32 tp_sec;
|
||||
__u32 tp_nsec;
|
||||
__u16 tp_vlan_tci;
|
||||
};
|
||||
|
||||
#define TPACKET2_HDRLEN (TPACKET_ALIGN(sizeof(struct tpacket2_hdr)) + sizeof(struct sockaddr_ll))
|
||||
|
Reference in New Issue
Block a user