|
@@ -3381,17 +3381,13 @@ BPF_CALL_2(bpf_sock_ops_cb_flags_set, struct bpf_sock_ops_kern *, bpf_sock,
|
|
struct sock *sk = bpf_sock->sk;
|
|
struct sock *sk = bpf_sock->sk;
|
|
int val = argval & BPF_SOCK_OPS_ALL_CB_FLAGS;
|
|
int val = argval & BPF_SOCK_OPS_ALL_CB_FLAGS;
|
|
|
|
|
|
- if (!sk_fullsock(sk))
|
|
|
|
|
|
+ if (!IS_ENABLED(CONFIG_INET) || !sk_fullsock(sk))
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
|
|
|
|
-#ifdef CONFIG_INET
|
|
|
|
if (val)
|
|
if (val)
|
|
tcp_sk(sk)->bpf_sock_ops_cb_flags = val;
|
|
tcp_sk(sk)->bpf_sock_ops_cb_flags = val;
|
|
|
|
|
|
return argval & (~BPF_SOCK_OPS_ALL_CB_FLAGS);
|
|
return argval & (~BPF_SOCK_OPS_ALL_CB_FLAGS);
|
|
-#else
|
|
|
|
- return -EINVAL;
|
|
|
|
-#endif
|
|
|
|
}
|
|
}
|
|
|
|
|
|
static const struct bpf_func_proto bpf_sock_ops_cb_flags_set_proto = {
|
|
static const struct bpf_func_proto bpf_sock_ops_cb_flags_set_proto = {
|