• Arnd Bergmann's avatar
    netfilter: synproxy: fix building syncookie calls · 8527fa6c
    Arnd Bergmann authored
    When either CONFIG_IPV6 or CONFIG_SYN_COOKIES are disabled, the kernel
    fails to build:
    
    include/linux/netfilter_ipv6.h:180:9: error: implicit declaration of function '__cookie_v6_init_sequence'
          [-Werror,-Wimplicit-function-declaration]
            return __cookie_v6_init_sequence(iph, th, mssp);
    include/linux/netfilter_ipv6.h:194:9: error: implicit declaration of function '__cookie_v6_check'
          [-Werror,-Wimplicit-function-declaration]
            return __cookie_v6_check(iph, th, cookie);
    net/ipv6/netfilter.c:237:26: error: use of undeclared identifier '__cookie_v6_init_sequence'; did you mean 'cookie_init_sequence'?
    net/ipv6/netfilter.c:238:21: error: use of undeclared identifier '__cookie_v6_check'; did you mean '__cookie_v4_check'?
    
    Fix the IS_ENABLED() checks to match the function declaration
    and definitions for these.
    
    Fixes: 3006a522 ("netfilter: synproxy: remove module dependency on IPv6 SYNPROXY")
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
    8527fa6c
netfilter.c 6.49 KB