forked from Minki/linux
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>
This commit is contained in:
parent
8525d6f84f
commit
7c9989a76e
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user