projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4f9218a
)
bpf: allow access to skb->len from offloads
author
Jakub Kicinski
<
[email protected]
>
Mon, 16 Oct 2017 23:40:56 +0000
(16:40 -0700)
committer
David S. Miller
<
[email protected]
>
Wed, 18 Oct 2017 13:17:11 +0000
(14:17 +0100)
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 <
[email protected]
>
Acked-by: Daniel Borkmann <
[email protected]
>
Acked-by: Alexei Starovoitov <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
net/core/filter.c
patch
|
blob
|
history
diff --git
a/net/core/filter.c
b/net/core/filter.c
index 7373a08fbef73e0bfd8a9da0a8fc30066d8366f8..09e011f20291e48d4425434276032ed8b8457348 100644
(file)
--- 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;