[PATCH nf-next] netfilter: ipv6: fix CONFIG_SYN_COOKIES=n

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



With CONFIG_SYN_COOKIES=n:

   In file included from net/ipv6/ip6_output.c:44:0:
   include/linux/netfilter_ipv6.h: In function 'nf_ipv6_cookie_init_sequence':
>> include/linux/netfilter_ipv6.h:174:9: error: implicit declaration of function '__cookie_v6_init_sequence'; did you mean 'cookie_init_sequence'? [-Werror=implicit-function-declaration]
     return __cookie_v6_init_sequence(iph, th, mssp);
            ^~~~~~~~~~~~~~~~~~~~~~~~~
            cookie_init_sequence
   include/linux/netfilter_ipv6.h: In function 'nf_cookie_v6_check':
>> include/linux/netfilter_ipv6.h:189:9: error: implicit declaration of function '__cookie_v6_check'; did you mean '__cookie_v4_check'? [-Werror=implicit-function-declaration]
     return __cookie_v6_check(iph, th, cookie);
            ^~~~~~~~~~~~~~~~~
            __cookie_v4_check

Fixes: 3006a5224f15 ("netfilter: synproxy: remove module dependency on IPv6 SYNPROXY")
Signed-off-by: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>
---
 net/ipv6/netfilter.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/ipv6/netfilter.c b/net/ipv6/netfilter.c
index dffb10fdc3e8..f80188b749c0 100644
--- a/net/ipv6/netfilter.c
+++ b/net/ipv6/netfilter.c
@@ -234,6 +234,8 @@ static const struct nf_ipv6_ops ipv6ops = {
 	.route_me_harder	= ip6_route_me_harder,
 	.dev_get_saddr		= ipv6_dev_get_saddr,
 	.route			= __nf_ip6_route,
+#endif
+#if IS_MODULE(CONFIG_IPV6) && defined(CONFIG_SYN_COOKIES)
 	.cookie_init_sequence	= __cookie_v6_init_sequence,
 	.cookie_v6_check	= __cookie_v6_check,
 #endif
-- 
2.11.0




[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux