Skip to content

Commit a5192c5

Browse files
Lawrence Brakmodavem330
authored andcommitted
bpf: fix to bpf_setsockops
Fixed build error due to misplaced "#ifdef CONFIG_INET" (moved 1 statement up). Signed-off-by: Lawrence Brakmo <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent bcdb239 commit a5192c5

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

net/core/filter.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2717,9 +2717,9 @@ BPF_CALL_5(bpf_setsockopt, struct bpf_sock_ops_kern *, bpf_sock,
27172717
default:
27182718
ret = -EINVAL;
27192719
}
2720+
#ifdef CONFIG_INET
27202721
} else if (level == SOL_TCP &&
27212722
sk->sk_prot->setsockopt == tcp_setsockopt) {
2722-
#ifdef CONFIG_INET
27232723
if (optname == TCP_CONGESTION) {
27242724
char name[TCP_CA_NAME_MAX];
27252725

@@ -2757,7 +2757,6 @@ BPF_CALL_5(bpf_setsockopt, struct bpf_sock_ops_kern *, bpf_sock,
27572757
ret = -EINVAL;
27582758
}
27592759
}
2760-
#else
27612760
ret = -EINVAL;
27622761
#endif
27632762
} else {

0 commit comments

Comments
 (0)