@@ -9328,8 +9328,10 @@ const struct bpf_func_proto bpf_skc_to_t
BPF_CALL_1(bpf_skc_to_tcp_timewait_sock, struct sock *, sk)
{
+#ifdef CONFIG_INET
if (sk->sk_prot == &tcp_prot && sk->sk_state == TCP_TIME_WAIT)
return (unsigned long)sk;
+#endif
#if IS_BUILTIN(CONFIG_IPV6)
if (sk->sk_prot == &tcpv6_prot && sk->sk_state == TCP_TIME_WAIT)
@@ -9350,8 +9352,10 @@ const struct bpf_func_proto bpf_skc_to_t
BPF_CALL_1(bpf_skc_to_tcp_request_sock, struct sock *, sk)
{
+#ifdef CONFIG_INET
if (sk->sk_prot == &tcp_prot && sk->sk_state == TCP_NEW_SYN_RECV)
return (unsigned long)sk;
+#endif
#if IS_BUILTIN(CONFIG_IPV6)
if (sk->sk_prot == &tcpv6_prot && sk->sk_state == TCP_NEW_SYN_RECV)