|
@@ -39,6 +39,7 @@
|
|
|
#include <linux/reciprocal_div.h>
|
|
|
#include <linux/ratelimit.h>
|
|
|
#include <linux/seccomp.h>
|
|
|
+#include <linux/if_vlan.h>
|
|
|
|
|
|
/* No hurry in this branch
|
|
|
*
|
|
@@ -341,6 +342,12 @@ load_b:
|
|
|
case BPF_S_ANC_CPU:
|
|
|
A = raw_smp_processor_id();
|
|
|
continue;
|
|
|
+ case BPF_S_ANC_VLAN_TAG:
|
|
|
+ A = vlan_tx_tag_get(skb);
|
|
|
+ continue;
|
|
|
+ case BPF_S_ANC_VLAN_TAG_PRESENT:
|
|
|
+ A = !!vlan_tx_tag_present(skb);
|
|
|
+ continue;
|
|
|
case BPF_S_ANC_NLATTR: {
|
|
|
struct nlattr *nla;
|
|
|
|
|
@@ -600,6 +607,8 @@ int sk_chk_filter(struct sock_filter *filter, unsigned int flen)
|
|
|
ANCILLARY(RXHASH);
|
|
|
ANCILLARY(CPU);
|
|
|
ANCILLARY(ALU_XOR_X);
|
|
|
+ ANCILLARY(VLAN_TAG);
|
|
|
+ ANCILLARY(VLAN_TAG_PRESENT);
|
|
|
}
|
|
|
}
|
|
|
ftest->code = code;
|