All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ipvs: fix header inline net_ipvs function to work without CONFIG_IP_VS
@ 2015-03-25  8:53 Rafał Miłecki
  2015-03-25  9:03 ` Nicolas Dichtel
  2015-03-25  9:17 ` [PATCH V2] ipvs: disable inline net_ipvs function with CONFIG_IP_VS not being set Rafał Miłecki
  0 siblings, 2 replies; 8+ messages in thread
From: Rafał Miłecki @ 2015-03-25  8:53 UTC (permalink / raw)
  To: Pablo Neira Ayuso, Patrick McHardy, Jozsef Kadlecsik
  Cc: netfilter-devel, coreteam, Nicolas Dichtel, Julian Anastasov,
	Simon Horman, Rafał Miłecki

Including net/ip_vs.h without CONFIG_IP_VS was causing:
include/net/ip_vs.h: In function 'net_ipvs':
include/net/ip_vs.h:35:12: error: 'struct net' has no member named 'ipvs'

Fixes: 8b4d14d8eb368 ("netns: exclude ipvs from struct net when IPVS disabled")
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
---
 include/net/ip_vs.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h
index 615b20b..cd3942f 100644
--- a/include/net/ip_vs.h
+++ b/include/net/ip_vs.h
@@ -32,7 +32,10 @@
 /* Generic access of ipvs struct */
 static inline struct netns_ipvs *net_ipvs(struct net* net)
 {
+#if IS_ENABLED(CONFIG_IP_VS)
 	return net->ipvs;
+#endif
+	return NULL;
 }
 
 /* Get net ptr from skb in traffic cases
-- 
1.8.4.5

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2015-03-25 20:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-25  8:53 [PATCH] ipvs: fix header inline net_ipvs function to work without CONFIG_IP_VS Rafał Miłecki
2015-03-25  9:03 ` Nicolas Dichtel
2015-03-25  9:17 ` [PATCH V2] ipvs: disable inline net_ipvs function with CONFIG_IP_VS not being set Rafał Miłecki
2015-03-25 10:25   ` Nicolas Dichtel
2015-03-25 11:08     ` Rafał Miłecki
2015-03-25 13:12       ` Nicolas Dichtel
2015-03-25 20:04   ` Julian Anastasov
2015-03-25 20:15     ` Rafał Miłecki

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.