Commit 9df59055 authored by David Ahern's avatar David Ahern Committed by David S. Miller

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: default avatarDaniel Borkmann <daniel@iogearbox.net>
Signed-off-by: default avatarDavid Ahern <dsahern@gmail.com>
Acked-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
Acked-by: default avatarAlexei Starovoitov <ast@kernel.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c54a5048
......@@ -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:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment