From: "Rafał Miłecki" <zajec5@gmail.com>
To: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Cc: Pablo Neira Ayuso <pablo@netfilter.org>,
Patrick McHardy <kaber@trash.net>,
Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>,
netfilter-devel@vger.kernel.org, Julian Anastasov <ja@ssi.bg>,
Simon Horman <horms@verge.net.au>
Subject: Re: [PATCH V2] ipvs: disable inline net_ipvs function with CONFIG_IP_VS not being set
Date: Wed, 25 Mar 2015 12:08:53 +0100 [thread overview]
Message-ID: <CACna6rwMOJqRusrooUXKFk9HbVA4NqOY18fCTkqHyTvQA6O_bA@mail.gmail.com> (raw)
In-Reply-To: <55128D32.50201@6wind.com>
On 25 March 2015 at 11:25, Nicolas Dichtel <nicolas.dichtel@6wind.com> 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@gmail.com>
>> ---
>> 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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2015-03-25 11:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2015-03-25 13:12 ` Nicolas Dichtel
2015-03-25 20:04 ` Julian Anastasov
2015-03-25 20:15 ` Rafał Miłecki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CACna6rwMOJqRusrooUXKFk9HbVA4NqOY18fCTkqHyTvQA6O_bA@mail.gmail.com \
--to=zajec5@gmail.com \
--cc=horms@verge.net.au \
--cc=ja@ssi.bg \
--cc=kaber@trash.net \
--cc=kadlec@blackhole.kfki.hu \
--cc=netfilter-devel@vger.kernel.org \
--cc=nicolas.dichtel@6wind.com \
--cc=pablo@netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).