* [PATCH 1/2] netfilter: ipvs: fix compiler warnings
2011-01-22 3:10 [GIT PULL nf-next-2.6] IPVS updates for v2.6.38-rc1 Simon Horman
@ 2011-01-22 3:10 ` Simon Horman
2011-01-22 3:10 ` [PATCH 2/2] IPVS: Change sock_create_kernel() to __sock_create() Simon Horman
2011-01-22 17:04 ` [GIT PULL nf-next-2.6] IPVS updates for v2.6.38-rc1 Patrick McHardy
2 siblings, 0 replies; 4+ messages in thread
From: Simon Horman @ 2011-01-22 3:10 UTC (permalink / raw)
To: lvs-devel, netfilter-devel, netdev
Cc: Changli Gao, Hans Schillstrom, Julian Anastasov, Patrick McHardy,
Simon Horman
From: Changli Gao <xiaosuo@gmail.com>
Fix compiler warnings when no transport protocol load balancing support
is configured.
[horms@verge.net.au: removed suprious __ip_vs_cleanup() clean-up hunk]
Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
---
net/netfilter/ipvs/ip_vs_ctl.c | 4 ++++
net/netfilter/ipvs/ip_vs_proto.c | 4 ++++
2 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c
index 09ca2ce..68b8033 100644
--- a/net/netfilter/ipvs/ip_vs_ctl.c
+++ b/net/netfilter/ipvs/ip_vs_ctl.c
@@ -2062,7 +2062,9 @@ static const struct file_operations ip_vs_stats_percpu_fops = {
*/
static int ip_vs_set_timeout(struct net *net, struct ip_vs_timeout_user *u)
{
+#if defined(CONFIG_IP_VS_PROTO_TCP) || defined(CONFIG_IP_VS_PROTO_UDP)
struct ip_vs_proto_data *pd;
+#endif
IP_VS_DBG(2, "Setting timeout tcp:%d tcpfin:%d udp:%d\n",
u->tcp_timeout,
@@ -2405,7 +2407,9 @@ __ip_vs_get_dest_entries(struct net *net, const struct ip_vs_get_dests *get,
static inline void
__ip_vs_get_timeouts(struct net *net, struct ip_vs_timeout_user *u)
{
+#if defined(CONFIG_IP_VS_PROTO_TCP) || defined(CONFIG_IP_VS_PROTO_UDP)
struct ip_vs_proto_data *pd;
+#endif
#ifdef CONFIG_IP_VS_PROTO_TCP
pd = ip_vs_proto_data_get(net, IPPROTO_TCP);
diff --git a/net/netfilter/ipvs/ip_vs_proto.c b/net/netfilter/ipvs/ip_vs_proto.c
index 6ac986c..17484a4 100644
--- a/net/netfilter/ipvs/ip_vs_proto.c
+++ b/net/netfilter/ipvs/ip_vs_proto.c
@@ -60,6 +60,9 @@ static int __used __init register_ip_vs_protocol(struct ip_vs_protocol *pp)
return 0;
}
+#if defined(CONFIG_IP_VS_PROTO_TCP) || defined(CONFIG_IP_VS_PROTO_UDP) || \
+ defined(CONFIG_IP_VS_PROTO_SCTP) || defined(CONFIG_IP_VS_PROTO_AH) || \
+ defined(CONFIG_IP_VS_PROTO_ESP)
/*
* register an ipvs protocols netns related data
*/
@@ -85,6 +88,7 @@ register_ip_vs_proto_netns(struct net *net, struct ip_vs_protocol *pp)
return 0;
}
+#endif
/*
* unregister an ipvs protocol
--
1.7.2.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] IPVS: Change sock_create_kernel() to __sock_create()
2011-01-22 3:10 [GIT PULL nf-next-2.6] IPVS updates for v2.6.38-rc1 Simon Horman
2011-01-22 3:10 ` [PATCH 1/2] netfilter: ipvs: fix compiler warnings Simon Horman
@ 2011-01-22 3:10 ` Simon Horman
2011-01-22 17:04 ` [GIT PULL nf-next-2.6] IPVS updates for v2.6.38-rc1 Patrick McHardy
2 siblings, 0 replies; 4+ messages in thread
From: Simon Horman @ 2011-01-22 3:10 UTC (permalink / raw)
To: lvs-devel, netfilter-devel, netdev
Cc: Changli Gao, Hans Schillstrom, Julian Anastasov, Patrick McHardy,
Simon Horman
The recent netns changes omitted to change
sock_create_kernel() to __sock_create() in ip_vs_sync.c
The effect of this is that the interface will be selected in the
root-namespace, from my point of view it's a major bug.
Reported-by: Hans Schillstrom <hans@schillstrom.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
---
net/netfilter/ipvs/ip_vs_sync.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/netfilter/ipvs/ip_vs_sync.c b/net/netfilter/ipvs/ip_vs_sync.c
index d1adf98..d5a6e64 100644
--- a/net/netfilter/ipvs/ip_vs_sync.c
+++ b/net/netfilter/ipvs/ip_vs_sync.c
@@ -1305,7 +1305,7 @@ static struct socket *make_send_sock(struct net *net)
int result;
/* First create a socket */
- result = sock_create_kern(PF_INET, SOCK_DGRAM, IPPROTO_UDP, &sock);
+ result = __sock_create(net, PF_INET, SOCK_DGRAM, IPPROTO_UDP, &sock, 1);
if (result < 0) {
pr_err("Error during creation of socket; terminating\n");
return ERR_PTR(result);
@@ -1351,7 +1351,7 @@ static struct socket *make_receive_sock(struct net *net)
int result;
/* First create a socket */
- result = sock_create_kern(PF_INET, SOCK_DGRAM, IPPROTO_UDP, &sock);
+ result = __sock_create(net, PF_INET, SOCK_DGRAM, IPPROTO_UDP, &sock, 1);
if (result < 0) {
pr_err("Error during creation of socket; terminating\n");
return ERR_PTR(result);
--
1.7.2.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [GIT PULL nf-next-2.6] IPVS updates for v2.6.38-rc1
2011-01-22 3:10 [GIT PULL nf-next-2.6] IPVS updates for v2.6.38-rc1 Simon Horman
2011-01-22 3:10 ` [PATCH 1/2] netfilter: ipvs: fix compiler warnings Simon Horman
2011-01-22 3:10 ` [PATCH 2/2] IPVS: Change sock_create_kernel() to __sock_create() Simon Horman
@ 2011-01-22 17:04 ` Patrick McHardy
2 siblings, 0 replies; 4+ messages in thread
From: Patrick McHardy @ 2011-01-22 17:04 UTC (permalink / raw)
To: Simon Horman
Cc: lvs-devel, netfilter-devel, netdev, Changli Gao,
Hans Schillstrom, Julian Anastasov
On 22.01.2011 04:10, Simon Horman wrote:
> Hi Patrick, please consider pulling
> git://git.kernel.org/pub/scm/linux/kernel/git/horms/lvs-test-2.6.git for-patrick
>
> This includes bugfixes by Changli Gao and Hans Schillstrom.
>
> Changli Gao (1):
> netfilter: ipvs: fix compiler warnings
>
> Simon Horman (1):
> IPVS: Change sock_create_kernel() to __sock_create()
Pulled, thanks Simon.
^ permalink raw reply [flat|nested] 4+ messages in thread