From: Pablo Neira Ayuso Date: Fri, 31 May 2019 09:15:26 +0000 (+0200) Subject: netfilter: nf_conntrack_bridge: fix CONFIG_IPV6=y X-Git-Tag: Ubuntu-5.13.0-19.19~8166^2~377 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=c9bb6165a16e6d5498981a6c777b94a78e74462b;p=mirror_ubuntu-jammy-kernel.git netfilter: nf_conntrack_bridge: fix CONFIG_IPV6=y This patch fixes a few problems with CONFIG_IPV6=y and CONFIG_NF_CONNTRACK_BRIDGE=m: In file included from net/netfilter/utils.c:5: include/linux/netfilter_ipv6.h: In function 'nf_ipv6_br_defrag': include/linux/netfilter_ipv6.h:110:9: error: implicit declaration of function 'nf_ct_frag6_gather'; did you mean 'nf_ct_attach'? [-Werror=implicit-function-declaration] And these too: net/ipv6/netfilter.c:242:2: error: unknown field 'br_defrag' specified in initializer net/ipv6/netfilter.c:243:2: error: unknown field 'br_fragment' specified in initializer This patch includes an original chunk from wenxu. Fixes: 764dd163ac92 ("netfilter: nf_conntrack_bridge: add support for IPv6") Reported-by: Stephen Rothwell Reported-by: Yuehaibing Reported-by: kbuild test robot Reported-by: wenxu Signed-off-by: Pablo Neira Ayuso Signed-off-by: wenxu Signed-off-by: David S. Miller --- diff --git a/include/linux/netfilter_ipv6.h b/include/linux/netfilter_ipv6.h index a21b8c9623ee..3a3dc4b1f0e7 100644 --- a/include/linux/netfilter_ipv6.h +++ b/include/linux/netfilter_ipv6.h @@ -96,6 +96,8 @@ static inline int nf_ip6_route(struct net *net, struct dst_entry **dst, #endif } +#include + static inline int nf_ipv6_br_defrag(struct net *net, struct sk_buff *skb, u32 user) { diff --git a/net/ipv6/netfilter.c b/net/ipv6/netfilter.c index c6665382acb5..9530cc280953 100644 --- a/net/ipv6/netfilter.c +++ b/net/ipv6/netfilter.c @@ -238,7 +238,7 @@ static const struct nf_ipv6_ops ipv6ops = { .route_input = ip6_route_input, .fragment = ip6_fragment, .reroute = nf_ip6_reroute, -#if IS_MODULE(CONFIG_NF_CONNTRACK_BRIDGE) +#if IS_MODULE(CONFIG_IPV6) .br_defrag = nf_ct_frag6_gather, .br_fragment = br_ip6_fragment, #endif