diff options
-rw-r--r-- | net/core/filter.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/core/filter.c b/net/core/filter.c index 8cb242b4400f..bf5b6efd369a 100644 --- a/net/core/filter.c +++ b/net/core/filter.c @@ -4051,14 +4051,15 @@ static const struct bpf_func_proto bpf_setsockopt_proto = { BPF_CALL_5(bpf_getsockopt, struct bpf_sock_ops_kern *, bpf_sock, int, level, int, optname, char *, optval, int, optlen) { - struct inet_connection_sock *icsk; struct sock *sk = bpf_sock->sk; - struct tcp_sock *tp; if (!sk_fullsock(sk)) goto err_clear; #ifdef CONFIG_INET if (level == SOL_TCP && sk->sk_prot->getsockopt == tcp_getsockopt) { + struct inet_connection_sock *icsk; + struct tcp_sock *tp; + switch (optname) { case TCP_CONGESTION: icsk = inet_csk(sk); |