summaryrefslogtreecommitdiff
path: root/net/core/filter.c
diff options
context:
space:
mode:
authorJakub Kicinski <jakub.kicinski@netronome.com>2017-10-16 16:40:56 -0700
committerDavid S. Miller <davem@davemloft.net>2017-10-18 14:17:11 +0100
commit29d1b33a2e0a3288374102b004a15cb278a2303e (patch)
tree7e497a6e77e7b929801554eedfc4ea1b431d1e22 /net/core/filter.c
parent4f9218aaf8a463f76cac40aa08d859d065f8cc9e (diff)
bpf: allow access to skb->len from offloads
Since we are now doing strict checking of what offloads may access, make sure skb->len is on that list. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Acked-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/filter.c')
-rw-r--r--net/core/filter.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/core/filter.c b/net/core/filter.c
index 7373a08fbef7..09e011f20291 100644
--- a/net/core/filter.c
+++ b/net/core/filter.c
@@ -3738,6 +3738,8 @@ tc_cls_act_is_valid_access_analyzer(int off, int size,
struct bpf_insn_access_aux *info)
{
switch (off) {
+ case offsetof(struct sk_buff, len):
+ return true;
case offsetof(struct sk_buff, data):
info->reg_type = PTR_TO_PACKET;
return true;