netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
To: "Rafał Miłecki" <zajec5@gmail.com>,
	"Pablo Neira Ayuso" <pablo@netfilter.org>,
	"Patrick McHardy" <kaber@trash.net>,
	"Jozsef Kadlecsik" <kadlec@blackhole.kfki.hu>
Cc: netfilter-devel@vger.kernel.org, coreteam@netfilter.org,
	Julian Anastasov <ja@ssi.bg>, Simon Horman <horms@verge.net.au>
Subject: Re: [PATCH] ipvs: fix header inline net_ipvs function to work without CONFIG_IP_VS
Date: Wed, 25 Mar 2015 10:03:02 +0100	[thread overview]
Message-ID: <551279C6.1090407@6wind.com> (raw)
In-Reply-To: <1427273637-29151-1-git-send-email-zajec5@gmail.com>

Le 25/03/2015 09:53, 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>
> ---
>   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;
>   }
This function is used only by the ipvs module, maybe it should be defined only
when CONFIG_IP_VS is set?

Anyway, it must not return NULL, all callers assume that the pointer is valid.
--
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

  reply	other threads:[~2015-03-25  9:03 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 [this message]
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

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=551279C6.1090407@6wind.com \
    --to=nicolas.dichtel@6wind.com \
    --cc=coreteam@netfilter.org \
    --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=pablo@netfilter.org \
    --cc=zajec5@gmail.com \
    /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).