From e801de945a28975e794c8003c9fa06ce149a9356 Mon Sep 17 00:00:00 2001 From: Wensong Zhang Date: Sun, 12 Oct 2003 22:28:21 -0700 Subject: [PATCH] [IPVS]: Fix IPVS sync state check. Patch from Horms 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. --- net/ipv4/ipvs/ip_vs_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv4/ipvs/ip_vs_core.c b/net/ipv4/ipvs/ip_vs_core.c index 289b1b9329fda..30076c969333a 100644 --- a/net/ipv4/ipvs/ip_vs_core.c +++ b/net/ipv4/ipvs/ip_vs_core.c @@ -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] -- 2.53.0