mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-01 06:33:07 +00:00
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>
This commit is contained in:
parent
c54a504890
commit
9df59055ed
1 changed files with 0 additions and 2 deletions
|
@ -3468,9 +3468,7 @@ static bool sock_filter_is_valid_access(int off, int size,
|
|||
if (type == BPF_WRITE) {
|
||||
switch (off) {
|
||||
case offsetof(struct bpf_sock, bound_dev_if):
|
||||
break;
|
||||
case offsetof(struct bpf_sock, mark):
|
||||
break;
|
||||
case offsetof(struct bpf_sock, priority):
|
||||
break;
|
||||
default:
|
||||
|
|
Loading…
Reference in a new issue