Skip to content

Commit 9df5905

Browse files
dsaherndavem330
authored andcommitted
bpf: Collapse offset checks in sock_filter_is_valid_access
Make sock_filter_is_valid_access consistent with other is_valid_access helpers. Requested-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: David Ahern <dsahern@gmail.com> Acked-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent c54a504 commit 9df5905

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

net/core/filter.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3468,9 +3468,7 @@ static bool sock_filter_is_valid_access(int off, int size,
34683468
if (type == BPF_WRITE) {
34693469
switch (off) {
34703470
case offsetof(struct bpf_sock, bound_dev_if):
3471-
break;
34723471
case offsetof(struct bpf_sock, mark):
3473-
break;
34743472
case offsetof(struct bpf_sock, priority):
34753473
break;
34763474
default:

0 commit comments

Comments
 (0)