Commit a5192c52 authored by Lawrence Brakmo's avatar Lawrence Brakmo Committed by David S. Miller

bpf: fix to bpf_setsockops

Fixed build error due to misplaced "#ifdef CONFIG_INET" (moved 1
statement up).
Signed-off-by: default avatarLawrence Brakmo <brakmo@fb.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent bcdb239b
...@@ -2717,9 +2717,9 @@ BPF_CALL_5(bpf_setsockopt, struct bpf_sock_ops_kern *, bpf_sock, ...@@ -2717,9 +2717,9 @@ BPF_CALL_5(bpf_setsockopt, struct bpf_sock_ops_kern *, bpf_sock,
default: default:
ret = -EINVAL; ret = -EINVAL;
} }
#ifdef CONFIG_INET
} else if (level == SOL_TCP && } else if (level == SOL_TCP &&
sk->sk_prot->setsockopt == tcp_setsockopt) { sk->sk_prot->setsockopt == tcp_setsockopt) {
#ifdef CONFIG_INET
if (optname == TCP_CONGESTION) { if (optname == TCP_CONGESTION) {
char name[TCP_CA_NAME_MAX]; char name[TCP_CA_NAME_MAX];
...@@ -2757,7 +2757,6 @@ BPF_CALL_5(bpf_setsockopt, struct bpf_sock_ops_kern *, bpf_sock, ...@@ -2757,7 +2757,6 @@ BPF_CALL_5(bpf_setsockopt, struct bpf_sock_ops_kern *, bpf_sock,
ret = -EINVAL; ret = -EINVAL;
} }
} }
#else
ret = -EINVAL; ret = -EINVAL;
#endif #endif
} else { } else {
......
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