Netdev List
 help / color / mirror / Atom feed
* [PATCH net-next] netfilter: ipv6: Fix build error without CONFIG_IPV6
@ 2019-06-12  8:47 YueHaibing
  2019-06-20 15:26 ` Yuehaibing
  2019-06-21 15:16 ` Pablo Neira Ayuso
  0 siblings, 2 replies; 6+ messages in thread
From: YueHaibing @ 2019-06-12  8:47 UTC (permalink / raw)
  To: pablo, kadlec, fw, davem, rdunlap
  Cc: linux-kernel, coreteam, netfilter-devel, netdev, YueHaibing

If CONFIG_IPV6 is not set, building fails:

net/bridge/netfilter/nf_conntrack_bridge.o: In function `nf_ct_bridge_pre':
nf_conntrack_bridge.c:(.text+0x41c): undefined symbol `nf_ct_frag6_gather'
net/bridge/netfilter/nf_conntrack_bridge.o: In function `nf_ct_bridge_post':
nf_conntrack_bridge.c:(.text+0x820): undefined symbol `br_ip6_fragment'

Reported-by: Hulk Robot <hulkci@huawei.com>
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Fixes: c9bb6165a16e ("netfilter: nf_conntrack_bridge: fix CONFIG_IPV6=y")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 include/linux/netfilter_ipv6.h | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/include/linux/netfilter_ipv6.h b/include/linux/netfilter_ipv6.h
index 3a3dc4b..0e1febc 100644
--- a/include/linux/netfilter_ipv6.h
+++ b/include/linux/netfilter_ipv6.h
@@ -108,8 +108,11 @@ static inline int nf_ipv6_br_defrag(struct net *net, struct sk_buff *skb,
 		return 1;
 
 	return v6_ops->br_defrag(net, skb, user);
-#else
+#endif
+#if IS_BUILTIN(CONFIG_IPV6)
 	return nf_ct_frag6_gather(net, skb, user);
+#else
+	return 1;
 #endif
 }
 
@@ -133,8 +136,11 @@ static inline int nf_br_ip6_fragment(struct net *net, struct sock *sk,
 		return 1;
 
 	return v6_ops->br_fragment(net, sk, skb, data, output);
-#else
+#endif
+#if IS_BUILTIN(CONFIG_IPV6)
 	return br_ip6_fragment(net, sk, skb, data, output);
+#else
+	return 1;
 #endif
 }
 
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-06-21 15:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-12  8:47 [PATCH net-next] netfilter: ipv6: Fix build error without CONFIG_IPV6 YueHaibing
2019-06-20 15:26 ` Yuehaibing
2019-06-20 15:50   ` Pablo Neira Ayuso
2019-06-21  2:05     ` Yuehaibing
2019-06-21 15:20       ` Pablo Neira Ayuso
2019-06-21 15:16 ` Pablo Neira Ayuso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox