netfilter: bridge: pass L2 header and VLAN as netlink attributes in queues to userspace
- This creates 2 netlink attribute NFQA_VLAN and NFQA_L2HDR. - These are filled up for the PF_BRIDGE family on the way to userspace. - NFQA_VLAN is a nested attribute, with the NFQA_VLAN_PROTO and the NFQA_VLAN_TCI carrying the corresponding vlan_proto and vlan_tci fields from the skb using big endian ordering (and using the CFI bit as the VLAN_TAG_PRESENT flag in vlan_tci as in the skb) Signed-off-by: Stephane Bryant <stephane.ml.bryant@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:

committed by
Pablo Neira Ayuso

parent
ac28634456
commit
15824ab29f
@@ -30,6 +30,14 @@ struct nfqnl_msg_packet_timestamp {
|
||||
__aligned_be64 usec;
|
||||
};
|
||||
|
||||
enum nfqnl_vlan_attr {
|
||||
NFQA_VLAN_UNSPEC,
|
||||
NFQA_VLAN_PROTO, /* __be16 skb vlan_proto */
|
||||
NFQA_VLAN_TCI, /* __be16 skb htons(vlan_tci) */
|
||||
__NFQA_VLAN_MAX,
|
||||
};
|
||||
#define NFQA_VLAN_MAX (__NFQA_VLAN_MAX + 1)
|
||||
|
||||
enum nfqnl_attr_type {
|
||||
NFQA_UNSPEC,
|
||||
NFQA_PACKET_HDR,
|
||||
@@ -50,6 +58,8 @@ enum nfqnl_attr_type {
|
||||
NFQA_UID, /* __u32 sk uid */
|
||||
NFQA_GID, /* __u32 sk gid */
|
||||
NFQA_SECCTX, /* security context string */
|
||||
NFQA_VLAN, /* nested attribute: packet vlan info */
|
||||
NFQA_L2HDR, /* full L2 header */
|
||||
|
||||
__NFQA_MAX
|
||||
};
|
||||
|
Reference in New Issue
Block a user