Skip to content

Commit

Permalink
bpf: fix to bpf_setsockops
Browse files Browse the repository at this point in the history
Fixed build error due to misplaced "#ifdef CONFIG_INET" (moved 1
statement up).

Signed-off-by: Lawrence Brakmo <brakmo@fb.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Lawrence Brakmo authored and David S. Miller committed Jul 2, 2017
1 parent bcdb239 commit a5192c5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions net/core/filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -2717,9 +2717,9 @@ BPF_CALL_5(bpf_setsockopt, struct bpf_sock_ops_kern *, bpf_sock,
default:
ret = -EINVAL;
}
#ifdef CONFIG_INET
} else if (level == SOL_TCP &&
sk->sk_prot->setsockopt == tcp_setsockopt) {
#ifdef CONFIG_INET
if (optname == TCP_CONGESTION) {
char name[TCP_CA_NAME_MAX];

Expand Down Expand Up @@ -2757,7 +2757,6 @@ BPF_CALL_5(bpf_setsockopt, struct bpf_sock_ops_kern *, bpf_sock,
ret = -EINVAL;
}
}
#else
ret = -EINVAL;
#endif
} else {
Expand Down

0 comments on commit a5192c5

Please sign in to comment.