mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 14:13:01 -04:00
UPSTREAM: bpf: Fix net/core/filter build errors when INET is not enabled
Fix build errors when CONFIG_INET is not set/enabled. (.text+0x2b1b): undefined reference to `tcp_prot' (.text+0x2b3b): undefined reference to `tcp_prot' Change-Id: I7a9060b7427f412890dd0179c026fa7fcae3abde Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Yonghong Song <yhs@fb.com> Link: https://lore.kernel.org/bpf/b1a858ec-7e04-56bc-248a-62cb9bbee726@infradead.org
This commit is contained in:
parent
01067412db
commit
1f21a9439a
1 changed files with 4 additions and 0 deletions
|
|
@ -9499,8 +9499,10 @@ const struct bpf_func_proto bpf_skc_to_tcp_sock_proto = {
|
|||
|
||||
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)
|
||||
|
|
@ -9521,8 +9523,10 @@ const struct bpf_func_proto bpf_skc_to_tcp_timewait_sock_proto = {
|
|||
|
||||
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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue