2022-02-20 23:59:01

by Robert Gadsdon

[permalink] [raw]
Subject: Re: Linux 5.17-rc5

Compile fail.   Fedora 35, GCC 11.2.1, x86_64..

....................
  AR      net/netfilter/built-in.a
  LD [M]  net/netfilter/nf_conntrack.o
  CC [M]  net/netfilter/xt_socket.o
net/netfilter/xt_socket.c: In function ‘socket_mt_destroy’:
net/netfilter/xt_socket.c:224:17: error: implicit declaration of
function ‘nf_defrag_ipv6_disable’; did you mean
‘nf_defrag_ipv4_disable’? [-Werror=implicit-function-declaration]
  224 |                 nf_defrag_ipv6_disable(par->net);
      |                 ^~~~~~~~~~~~~~~~~~~~~~
      |                 nf_defrag_ipv4_disable
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:288: net/netfilter/xt_socket.o] Error 1
make[1]: *** [scripts/Makefile.build:550: net/netfilter] Error 2
make: *** [Makefile:1831: net] Error 2


- already reported on Feb 11th, at:
http://lkml.iu.edu/hypermail/linux/kernel/2202.1/05890.html

Robert Gadsdon
February 20th 2022.


2022-02-21 18:30:56

by Woody Suwalski

[permalink] [raw]
Subject: Re: Linux 5.17-rc5

Robert Gadsdon wrote:
> Compile fail.   Fedora 35, GCC 11.2.1, x86_64..
>
> ....................
>   AR      net/netfilter/built-in.a
>   LD [M]  net/netfilter/nf_conntrack.o
>   CC [M]  net/netfilter/xt_socket.o
> net/netfilter/xt_socket.c: In function ‘socket_mt_destroy’:
> net/netfilter/xt_socket.c:224:17: error: implicit declaration of
> function ‘nf_defrag_ipv6_disable’; did you mean
> ‘nf_defrag_ipv4_disable’? [-Werror=implicit-function-declaration]
>   224 |                 nf_defrag_ipv6_disable(par->net);
>       |                 ^~~~~~~~~~~~~~~~~~~~~~
>       |                 nf_defrag_ipv4_disable
> cc1: some warnings being treated as errors
> make[2]: *** [scripts/Makefile.build:288: net/netfilter/xt_socket.o]
> Error 1
> make[1]: *** [scripts/Makefile.build:550: net/netfilter] Error 2
> make: *** [Makefile:1831: net] Error 2
>
>
> - already reported on Feb 11th, at:
> http://lkml.iu.edu/hypermail/linux/kernel/2202.1/05890.html
>
> Robert Gadsdon
> February 20th 2022.
>
Compile failed for me as well.

The workaround:

nf_defrag_ipv6.patch
--- a/net/netfilter/xt_socket.c    2022-02-21 07:29:21.938263397 -0500
+++ b/net/netfilter/xt_socket.c    2022-02-21 07:40:16.730022272 -0500
@@ -17,11 +17,11 @@
 #include <net/inet_sock.h>
 #include <net/netfilter/ipv4/nf_defrag_ipv4.h>

-#if IS_ENABLED(CONFIG_IP6_NF_IPTABLES)
+//#if IS_ENABLED(CONFIG_IP6_NF_IPTABLES)
 #include <linux/netfilter_ipv6/ip6_tables.h>
 #include <net/inet6_hashtables.h>
 #include <net/netfilter/ipv6/nf_defrag_ipv6.h>
-#endif
+//#endif

 #include <net/netfilter/nf_socket.h>
 #include <linux/netfilter/xt_socket.h>



Or force use CONFIG_IP6_NF_IPTABLES

Thanks, Woody