All of lore.kernel.org
 help / color / mirror / Atom feed
* [2.6 PATCH] Fix IPVS sync state check
@ 2003-10-13 15:15 Wensong Zhang
  2003-10-13 19:25 ` David S. Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Wensong Zhang @ 2003-10-13 15:15 UTC (permalink / raw)
  To: netdev; +Cc: David S. Miller, Julian Anastasov

[-- Attachment #1: Type: TEXT/PLAIN, Size: 298 bytes --]



Hi,

Here is a one-line fix in the sync state check for the connection to be
synchronized. Since both the primay and the backup IPVS sync daemon can be
started in a box at a time now, we must check if the MASTER bit is set in
the sync state exactly.

Please check and apply it.

Thanks,

Wensong

[-- Attachment #2: Type: TEXT/PLAIN, Size: 1358 bytes --]

# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
#	           ChangeSet	1.1346  -> 1.1347 
#	net/ipv4/ipvs/ip_vs_core.c	1.6     -> 1.7    
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/10/13	wensong@linux-vs.org	1.1347
# [IPVS] Fix the sync state check for connection to be synchronized
# 
# 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.
# --------------------------------------------
#
diff -Nru a/net/ipv4/ipvs/ip_vs_core.c b/net/ipv4/ipvs/ip_vs_core.c
--- a/net/ipv4/ipvs/ip_vs_core.c	Mon Oct 13 23:04:52 2003
+++ b/net/ipv4/ipvs/ip_vs_core.c	Mon Oct 13 23:04:52 2003
@@ -1044,7 +1044,7 @@
 	/* 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]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [2.6 PATCH] Fix IPVS sync state check
  2003-10-13 15:15 [2.6 PATCH] Fix IPVS sync state check Wensong Zhang
@ 2003-10-13 19:25 ` David S. Miller
  2003-10-13 21:29   ` Julian Anastasov
  0 siblings, 1 reply; 3+ messages in thread
From: David S. Miller @ 2003-10-13 19:25 UTC (permalink / raw)
  To: Wensong Zhang; +Cc: netdev, ja

On Mon, 13 Oct 2003 23:15:26 +0800 (CST)
Wensong Zhang <wensong@linux-vs.org> wrote:

> Here is a one-line fix in the sync state check for the connection to be
> synchronized. Since both the primay and the backup IPVS sync daemon can be
> started in a box at a time now, we must check if the MASTER bit is set in
> the sync state exactly.
> 
> Please check and apply it.

Looks good, applied.  Thanks.

BTW, on the 2.4.x side the IPVS code still has the NF_DROP return
which Julian changed in the 2.6.x version of the IPVS code.  Maybe
this 2.6.x NF_DROP change needs to be propagated into the 2.4.x code?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [2.6 PATCH] Fix IPVS sync state check
  2003-10-13 19:25 ` David S. Miller
@ 2003-10-13 21:29   ` Julian Anastasov
  0 siblings, 0 replies; 3+ messages in thread
From: Julian Anastasov @ 2003-10-13 21:29 UTC (permalink / raw)
  To: David S. Miller; +Cc: Wensong Zhang, netdev


	Hello,

On Mon, 13 Oct 2003, David S. Miller wrote:

> BTW, on the 2.4.x side the IPVS code still has the NF_DROP return
> which Julian changed in the 2.6.x version of the IPVS code.  Maybe
> this 2.6.x NF_DROP change needs to be propagated into the 2.4.x code?

	The current 2.4 code does not need such fix, it was a
2.6 specific bug that I introduced with the non-linear patch.

Regards

--
Julian Anastasov <ja@ssi.bg>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-10-13 21:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-13 15:15 [2.6 PATCH] Fix IPVS sync state check Wensong Zhang
2003-10-13 19:25 ` David S. Miller
2003-10-13 21:29   ` Julian Anastasov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.