netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Rafał Miłecki" <zajec5@gmail.com>
To: 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,
	"Nicolas Dichtel" <nicolas.dichtel@6wind.com>,
	"Julian Anastasov" <ja@ssi.bg>,
	"Simon Horman" <horms@verge.net.au>,
	"Rafał Miłecki" <zajec5@gmail.com>
Subject: [PATCH] ipvs: fix header inline net_ipvs function to work without CONFIG_IP_VS
Date: Wed, 25 Mar 2015 09:53:57 +0100	[thread overview]
Message-ID: <1427273637-29151-1-git-send-email-zajec5@gmail.com> (raw)

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

             reply	other threads:[~2015-03-25  8:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-25  8:53 Rafał Miłecki [this message]
2015-03-25  9:03 ` [PATCH] ipvs: fix header inline net_ipvs function to work without CONFIG_IP_VS 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

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=1427273637-29151-1-git-send-email-zajec5@gmail.com \
    --to=zajec5@gmail.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=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).