From: Dong_Wei <Dong_Wei@nj.cpsecure.com>
To: Patrick McHardy <kaber@trash.net>
Cc: netfilter-devel@lists.netfilter.org,
Yasuyuki KOZAKAI <yasuyuki.kozakai@toshiba.co.jp>
Subject: Re: /proc/net/ip_conntrack trange behavior
Date: Thu, 30 Aug 2007 09:14:56 +0800 [thread overview]
Message-ID: <46D61A10.6010405@nj.cpsecure.com> (raw)
In-Reply-To: <46D5BFB5.6000206@trash.net>
Thanks a lot. Yasuyuki and kaber
I have looked the 2.6.20 kernel and found that the reason.
When ip_conntrack try to pick up an ESTABLISHED TCP connection, this
issue will happen.
2.6 set an 'sysctl' value to deal with this situation
static int tcp_new()
{
...snip...
if (new_state == TCP_CONNTRACK_SYN_SENT) {
do_something();
} else if (ip_ct_tcp_loose == 0) {
/* Don't try to pick up connections. */
return 0;
} else {
do_something();
}
}
And we can't avoid this issue on 2.4, because no code deal with the
special case.
Thanks!
> Yasuyuki KOZAKAI wrote:
>> From: Dong_Wei <Dong_Wei@nj.cpsecure.com>
>> Date: Fri, 24 Aug 2007 15:43:01 +0800
>>
>>> Hi, all
>>> When I checked /proc/net/ip_conntrack in my Linux server, I found
>>> some strange tracks like the following:
>>>
>>> [normal case]
>>> tcp 6 387113 ESTABLISHED src=219.135.189.40 dst=58.60.9.41
>>> sport=2391 dport=443 src=58.60.9.41 dst=219.135.189.40 sport=443
>>> dport=2391 [ASSURED] use=1
>>>
>>> [strange track]
>>> tcp 6 377231 ESTABLISHED src=222.173.17.207 dst=219.135.189.11
>>> sport=19691 dport=3815 [UNREPLIED] src=219.135.189.11 dst=222.173.17.207
>>> sport=3815 dport=19691 use=1
>>>
>>> As we kown after SYN->SYN,ACK->ACK. TCP connection is in ESTABLISHED
>>> state. and the ip_conntrack "see" the REPLY direction packet, I think
>>> the conntrak should be ASSURED. not UNREPLIED.
>>>
>>> So, pls help me. My kernel version is 2.4.22
>>>
>>> Thanks in advance :-)
>>>
>>
>> When only SYN and SYN/ACK are detected by ip_conntrack, the state of the
>> connection is ESTABLISHED. Please note that 'ESTABLISHED' is not TCP
>> state,
>> but generic connection state.
>
>
> Well, its TCP connection state. Whats probably happening is that you
> have connection pickup enabled, in which case a single ACK can lead
> to TCP ESTABLISHED state. It won't match "-m state --state ESTABLISHED"
> though.
>
next prev parent reply other threads:[~2007-08-30 1:14 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-24 7:43 /proc/net/ip_conntrack trange behavior Dong_Wei
2007-08-29 9:14 ` Yasuyuki KOZAKAI
2007-08-29 18:49 ` Patrick McHardy
2007-08-30 1:14 ` Dong_Wei [this message]
2007-08-30 6:49 ` Patrick McHardy
2007-08-30 9:48 ` Dong_Wei
2007-08-31 8:45 ` Patrick McHardy
2007-08-31 9:59 ` Dong_Wei
2007-08-31 15:09 ` Krzysztof Oledzki
2007-09-03 3:34 ` Dong_Wei
2007-09-03 4:03 ` Philip Craig
2007-09-03 5:11 ` Dong_Wei
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=46D61A10.6010405@nj.cpsecure.com \
--to=dong_wei@nj.cpsecure.com \
--cc=kaber@trash.net \
--cc=netfilter-devel@lists.netfilter.org \
--cc=yasuyuki.kozakai@toshiba.co.jp \
/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 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.