On 25 March 2015 at 11:25, Nicolas Dichtel <nicolas.dichtel@xxxxxxxxx> wrote: > Le 25/03/2015 10:17, Rafał Miłecki a écrit : >> >> 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@xxxxxxxxx> >> --- >> V2: Disable function totally instead of returning NULL. >> --- >> include/net/ip_vs.h | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h >> index 615b20b..e6f2f2a 100644 >> --- a/include/net/ip_vs.h >> +++ b/include/net/ip_vs.h >> @@ -29,11 +29,13 @@ >> #endif >> #include <net/net_namespace.h> /* Netw namespace */ >> >> +#if IS_ENABLED(CONFIG_IP_VS) >> /* Generic access of ipvs struct */ >> static inline struct netns_ipvs *net_ipvs(struct net* net) >> { >> return net->ipvs; >> } >> +#endif > > Ok, but this fix nothing, there is no bug upstream. This file is only > included > by ipvs module files. So maybe it should be moved to net/netfilter/ipvs/? > For me, it's a bit strange to have '#ifdef CONFIG_IP_VS' in a file specific > to > this module. This just fix your third party module. Will do. I was just thinking this header doesn't follow headers logic well and wanted to help. -- Rafał -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html