All of lore.kernel.org
 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 V2] ipvs: disable inline net_ipvs function with CONFIG_IP_VS not being set
Date: Wed, 25 Mar 2015 10:17:23 +0100	[thread overview]
Message-ID: <1427275043-1192-1-git-send-email-zajec5@gmail.com> (raw)
In-Reply-To: <1427273637-29151-1-git-send-email-zajec5@gmail.com>

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
 
 /* Get net ptr from skb in traffic cases
  * use skb_sknet when call is from userland (ioctl or netlink)
-- 
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

  parent reply	other threads:[~2015-03-25  9:17 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 ` Rafał Miłecki [this message]
2015-03-25 10:25   ` [PATCH V2] ipvs: disable inline net_ipvs function with CONFIG_IP_VS not being set 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=1427275043-1192-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.