Skip to content

Commit a42c985

Browse files
Jakub KicinskiSomasundaram Krishnasamy
authored andcommitted
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 <[email protected]> Acked-by: Daniel Borkmann <[email protected]> Acked-by: Alexei Starovoitov <[email protected]> Signed-off-by: David S. Miller <[email protected]> (cherry picked from commit 29d1b33) Orabug: 31667601 Signed-off-by: Alan Maguire <[email protected]> Reviewed-by: Mark Haywood <[email protected]> Signed-off-by: Somasundaram Krishnasamy <[email protected]>
1 parent 73e1353 commit a42c985

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

net/core/filter.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3852,6 +3852,8 @@ tc_cls_act_is_valid_access_analyzer(int off, int size,
38523852
struct bpf_insn_access_aux *info)
38533853
{
38543854
switch (off) {
3855+
case offsetof(struct sk_buff, len):
3856+
return true;
38553857
case offsetof(struct sk_buff, data):
38563858
info->reg_type = PTR_TO_PACKET;
38573859
return true;

0 commit comments

Comments
 (0)