Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -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: