diff options
author | Dan Carpenter <error27@gmail.com> | 2011-02-07 03:38:55 -0500 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2011-02-07 06:40:00 -0500 |
commit | 7c9989a76e62ceca90e5f31f8920fd6b7b8b6525 (patch) | |
tree | 047edb197bba95258e30caec9989d9ea3a11d3eb | |
parent | 8525d6f84f576402278a552ed17d2ba3b61f8e3c (diff) |
IPVS: precedence bug in ip_vs_sync_switch_mode()
'!' 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>
Signed-off-by: Hans Schillstrom <hans.schillstrom@ericsson.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
-rw-r--r-- | 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 2a2a8363ca16..d1b7298e5894 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) | |||
392 | { | 392 | { |
393 | struct netns_ipvs *ipvs = net_ipvs(net); | 393 | struct netns_ipvs *ipvs = net_ipvs(net); |
394 | 394 | ||
395 | if (!ipvs->sync_state & IP_VS_STATE_MASTER) | 395 | if (!(ipvs->sync_state & IP_VS_STATE_MASTER)) |
396 | return; | 396 | return; |
397 | if (mode == ipvs->sysctl_sync_ver || !ipvs->sync_buff) | 397 | if (mode == ipvs->sysctl_sync_ver || !ipvs->sync_buff) |
398 | return; | 398 | return; |