public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash•net>
To: davem@davemloft•net
Cc: netdev@vger•kernel.org, Patrick McHardy <kaber@trash•net>,
	netfilter-devel@vger•kernel.org
Subject: ipvs 02/05: fix synchronization on connection close
Date: Tue, 15 Dec 2009 17:14:29 +0100 (MET)	[thread overview]
Message-ID: <20091215161428.4146.67084.sendpatchset@x2.localnet> (raw)
In-Reply-To: <20091215161426.4146.55284.sendpatchset@x2.localnet>

commit 9abfe315de96aa5c9878b2f627542bc54901c6e9
Author: Xiaotian Feng <dfeng@redhat•com>
Date:   Mon Dec 14 16:38:21 2009 +0100

    ipvs: fix synchronization on connection close
    
    commit 9d3a0de makes slaves expire as they would do on the master
    with much shorter timeouts. But it introduces another problem:
    When we close a connection, on master server the connection became
    CLOSE_WAIT/TIME_WAIT, it was synced to slaves, but if master is
    finished within it's timeouts (CLOSE), it will not be synced to
    slaves. Then slaves will be kept on CLOSE_WAIT/TIME_WAIT until
    timeout reaches. Thus we should also sync with CLOSE.
    
    Cc: Wensong Zhang <wensong@linux-vs•org>
    Cc: Simon Horman <horms@verge•net.au>
    Cc: Julian Anastasov <ja@ssi•bg>
    Cc: David S. Miller <davem@davemloft•net>
    Signed-off-by: Xiaotian Feng <dfeng@redhat•com>
    Acked-by: Simon Horman <horms@verge•net.au>
    Signed-off-by: Patrick McHardy <kaber@trash•net>

diff --git a/net/netfilter/ipvs/ip_vs_core.c b/net/netfilter/ipvs/ip_vs_core.c
index b95699f..847ffca 100644
--- a/net/netfilter/ipvs/ip_vs_core.c
+++ b/net/netfilter/ipvs/ip_vs_core.c
@@ -1366,6 +1366,7 @@ ip_vs_in(unsigned int hooknum, struct sk_buff *skb,
 	       == sysctl_ip_vs_sync_threshold[0])) ||
 	     ((cp->protocol == IPPROTO_TCP) && (cp->old_state != cp->state) &&
 	      ((cp->state == IP_VS_TCP_S_FIN_WAIT) ||
+	       (cp->state == IP_VS_TCP_S_CLOSE) ||
 	       (cp->state == IP_VS_TCP_S_CLOSE_WAIT) ||
 	       (cp->state == IP_VS_TCP_S_TIME_WAIT)))))
 		ip_vs_sync_conn(cp);

  parent reply	other threads:[~2009-12-15 16:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-15 16:14 netfilter 00/05: netfilter fixes Patrick McHardy
2009-12-15 16:14 ` netfilter 01/05: xtables: document minimal required version Patrick McHardy
2009-12-15 16:14 ` Patrick McHardy [this message]
2009-12-15 16:14 ` ipv6 03/05: reassembly: use seperate reassembly queues for conntrack and local delivery Patrick McHardy
2009-12-15 16:14 ` netfilter 04/05: fix crashes in bridge netfilter caused by fragment jumps Patrick McHardy
2009-12-15 16:14 ` ipvs 05/05: zero usvc and udest Patrick McHardy
2009-12-16  5:12 ` netfilter 00/05: netfilter fixes David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091215161428.4146.67084.sendpatchset@x2.localnet \
    --to=kaber@trash$(echo .)net \
    --cc=davem@davemloft$(echo .)net \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=netfilter-devel@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox