Commit e801de94 authored by Wensong Zhang's avatar Wensong Zhang Committed by Stephen Hemminger

[IPVS]: Fix IPVS sync state check.

Patch from Horms <horms@vergenet.net>

Since both the primay and the backup sync daemon can be started in a box
at a time, we must just check if the MASTER bit is set in the sync state.
parent 23c50109
......@@ -1044,7 +1044,7 @@ ip_vs_in(unsigned int hooknum, struct sk_buff **pskb,
/* increase its packet counter and check if it is needed
to be synchronized */
atomic_inc(&cp->in_pkts);
if (ip_vs_sync_state == IP_VS_STATE_MASTER &&
if ((ip_vs_sync_state & IP_VS_STATE_MASTER) &&
(cp->protocol != IPPROTO_TCP ||
cp->state == IP_VS_TCP_S_ESTABLISHED) &&
(atomic_read(&cp->in_pkts) % sysctl_ip_vs_sync_threshold[1]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment