Parcourir la source

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>
David Ahern il y a 8 ans
Parent
commit
9df59055ed
1 fichiers modifiés avec 0 ajouts et 2 suppressions
  1. 0 2
      net/core/filter.c

+ 0 - 2
net/core/filter.c

@@ -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: