netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gao feng <gaofeng@cn.fujitsu.com>
To: netfilter-devel@vger.kernel.org, xiaosuo@gmail.com
Subject: Question about tcp reopen in tcp_in_window
Date: Thu, 17 Nov 2011 14:52:34 +0800	[thread overview]
Message-ID: <4EC4AF32.5050901@cn.fujitsu.com> (raw)

Hi

I has a question about the tcp reopen request in func tcp_in_window.
The code is below,what confuse me is that the var end is never after sender->td_end.

static int tcp_in_window(struct ip_ct_tcp *state,
		...
	if (sender->td_end == 0) {
		...
	} else if (((state->state == TCP_CONNTRACK_SYN_SENT
                     && dir == IP_CT_DIR_ORIGINAL)
                   || (state->state == TCP_CONNTRACK_SYN_RECV
                     && dir == IP_CT_DIR_REPLY))
                   && after(end, sender->td_end)) {

		...
	}
		...
}


When nf_conn rcv a syn request in TIME_WAIT state,the new_state is SYN_SNET.
in func tcp_packet, this nf_conn will be kill by nf_ct_kill and the syn packet will repeat.
So we will have a new nf_conn,whose sender->td_end is reset in func tcp_new.

finally,when this syn packet arrive tcp_in_window,the var end is equal to sender->td_end.

Maybe there is the other situation Or what I understand is totally wrong?

             reply	other threads:[~2011-11-17  6:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-17  6:52 Gao feng [this message]
2011-11-17  8:07 ` Question about tcp reopen in tcp_in_window Jozsef Kadlecsik
2011-11-17  9:05   ` Gao feng
2011-11-17  9:41     ` Jozsef Kadlecsik
2011-11-17 12:12       ` Gao feng

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=4EC4AF32.5050901@cn.fujitsu.com \
    --to=gaofeng@cn.fujitsu.com \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=xiaosuo@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).