Skip to content

Commit

Permalink
ipvs: change comparison on sync_refresh_period
Browse files Browse the repository at this point in the history
The sync_refresh_period variable is unsigned, so it can never be < 0.

Signed-off-by: Aaron Conole <[email protected]>
Signed-off-by: Simon Horman <[email protected]>
  • Loading branch information
apconole authored and horms committed Apr 28, 2017
1 parent 65ba101 commit fb90e8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/netfilter/ipvs/ip_vs_sync.c
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ static int ip_vs_sync_conn_needed(struct netns_ipvs *ipvs,
if (!(cp->flags & IP_VS_CONN_F_TEMPLATE) &&
pkts % sync_period != sysctl_sync_threshold(ipvs))
return 0;
} else if (sync_refresh_period <= 0 &&
} else if (!sync_refresh_period &&
pkts != sysctl_sync_threshold(ipvs))
return 0;

Expand Down

0 comments on commit fb90e8d

Please sign in to comment.