summaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorDavid Ahern2017-09-01 17:18:07 +0200
committerDavid S. Miller2017-09-01 19:37:14 +0200
commit9df59055ed8e2f817149e786b2a52bc17832d84e (patch)
treec70aa33ec7c7f4c84e0d64f15a3a8745f49e6dde /net/core
parentmvneta: Driver and hardware supports IPv6 offload, so enable it (diff)
downloadkernel-qcow2-linux-9df59055ed8e2f817149e786b2a52bc17832d84e.tar.gz
kernel-qcow2-linux-9df59055ed8e2f817149e786b2a52bc17832d84e.tar.xz
kernel-qcow2-linux-9df59055ed8e2f817149e786b2a52bc17832d84e.zip
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>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/filter.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/net/core/filter.c b/net/core/filter.c
index 9dad3e7e2e10..f9add024d92f 100644
--- a/net/core/filter.c
+++ b/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: