All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] IPVS: precedence bug in ip_vs_sync_switch_mode()
@ 2011-02-07  8:38 ` Dan Carpenter
  0 siblings, 0 replies; 7+ messages in thread
From: Dan Carpenter @ 2011-02-07  8:38 UTC (permalink / raw)
  To: Wensong Zhang
  Cc: Simon Horman, Julian Anastasov, hans.schillstrom, Patrick McHardy,
	David S. Miller, netdev, lvs-devel, netfilter-devel,
	kernel-janitors

'!' 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@gmail.com>

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;

^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [GIT PULL nf-next-2.6] IPVS
@ 2011-02-07  9:19 Simon Horman
  2011-02-07  9:19 ` [PATCH] IPVS: precedence bug in ip_vs_sync_switch_mode() Simon Horman
  0 siblings, 1 reply; 7+ messages in thread
From: Simon Horman @ 2011-02-07  9:19 UTC (permalink / raw)
  To: netdev, netfilter-devel, netfilter, lvs-devel
  Cc: Julian Anastasov, Hans Schillstrom, Dan Carpenter,
	Patrick McHardy

Hi Patrick,

please consider pulling 
git://git.kernel.org/pub/scm/linux/kernel/git/horms/lvs-test-2.6.git master
to get a precedence bug fix from Dan Carpenter.

 net/netfilter/ipvs/ip_vs_sync.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-02-07  9:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-07  8:38 [patch] IPVS: precedence bug in ip_vs_sync_switch_mode() Dan Carpenter
2011-02-07  8:38 ` Dan Carpenter
2011-02-07  9:09 ` Simon Horman
2011-02-07  9:09   ` Simon Horman
2011-02-07  9:34 ` Hans Schillstrom
2011-02-07  9:34   ` Hans Schillstrom
  -- strict thread matches above, loose matches on Subject: below --
2011-02-07  9:19 [GIT PULL nf-next-2.6] IPVS Simon Horman
2011-02-07  9:19 ` [PATCH] IPVS: precedence bug in ip_vs_sync_switch_mode() Simon Horman

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.