Re: #include <net/ip_vs.h> without CONFIG_IP_VS (error: 'struct net' has no member named 'ipvs')

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 24, 2015 at 07:02:25PM +0100, Rafał Miłecki wrote:
> Hello,
> 
> In my out-of-tree code I used to include include/net/ip_vs.h just to
> make use of a trivial helper ip_vs_check_diff4. I wasn't really using
> anything from net/netfilter/ipvs/ip_vs*.c.
> 
> Starting with kernel 3.11 I'm getting this error when compiling my module:
> include/net/ip_vs.h: In function 'net_ipvs':
> include/net/ip_vs.h:35:12: error: 'struct net' has no member named 'ipvs'
> 
> This is caused by the commit 8b4d14d8eb36874daf159d33dcccd4746a6f3189
> netns: exclude ipvs from struct net when IPVS disabled
> http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=8b4d14d8eb36874daf159d33dcccd4746a6f3189
> 
> I was thinking that including any Linux header should be safe, no
> matter what kernel configuration is used. Am I correct about this?
> 
> Should net_ipvs from include/net/ip_vs.h be fixed to e.g. return NULL
> if CONFIG_IP_VS isn't enabled?

That seems like a reasonable solution to me.

Would you care to propose a patch that notes the following:

Fixes: 8b4d14d8eb368 ("netns: exclude ipvs from struct net when IPVS disabled")
--
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




[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux