[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1297070381-24377-2-git-send-email-horms@verge.net.au>
Date: Mon, 7 Feb 2011 18:19:41 +0900
From: Simon Horman <horms@...ge.net.au>
To: netdev@...r.kernel.org, netfilter-devel@...r.kernel.org,
netfilter@...r.kernel.org, lvs-devel@...r.kernel.org
Cc: Julian Anastasov <ja@....bg>,
Hans Schillstrom <hans@...illstrom.com>,
Dan Carpenter <error27@...il.com>,
Patrick McHardy <kaber@...sh.net>,
Simon Horman <horms@...ge.net.au>
Subject: [PATCH] IPVS: precedence bug in ip_vs_sync_switch_mode()
From: Dan Carpenter <error27@...il.com>
'!' has higher precedence than '&'. IP_VS_STATE_MASTER is 0x1 so
the original code is equivelent to if (!ipvs->sync_state) ...
Signed-off-by: Dan Carpenter <error27@...il.com>
Signed-off-by: Simon Horman <horms@...ge.net.au>
---
net/netfilter/ipvs/ip_vs_sync.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/netfilter/ipvs/ip_vs_sync.c b/net/netfilter/ipvs/ip_vs_sync.c
index 2a2a836..d1b7298 100644
--- a/net/netfilter/ipvs/ip_vs_sync.c
+++ b/net/netfilter/ipvs/ip_vs_sync.c
@@ -392,7 +392,7 @@ void ip_vs_sync_switch_mode(struct net *net, int mode)
{
struct netns_ipvs *ipvs = net_ipvs(net);
- if (!ipvs->sync_state & IP_VS_STATE_MASTER)
+ if (!(ipvs->sync_state & IP_VS_STATE_MASTER))
return;
if (mode == ipvs->sysctl_sync_ver || !ipvs->sync_buff)
return;
--
1.7.2.3
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists