Skip to content
Commit f3335031 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller
Browse files

net: filter: add vlan tag access



BPF filters lack ability to access skb->vlan_tci

This patch adds two new ancillary accessors :

SKF_AD_VLAN_TAG         (44) mapped to vlan_tx_tag_get(skb)

SKF_AD_VLAN_TAG_PRESENT (48) mapped to vlan_tx_tag_present(skb)

This allows libpcap/tcpdump to use a kernel filter instead of
having to fallback to accept all packets, then filter them in
user space.

Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Suggested-by: default avatarAni Sinha <ani@aristanetworks.com>
Suggested-by: default avatarDaniel Borkmann <danborkmann@iogearbox.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0f6ae8f1
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment