From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Patrick McHardy <kaber@trash.net>
Cc: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>,
netfilter-devel@vger.kernel.org,
Saatvik Agarwal <saatvik.agarwal@stanford.edu>
Subject: Re: [PATCH] TCP simultaneous open support
Date: Tue, 02 Jun 2009 13:42:32 +0200 [thread overview]
Message-ID: <4A251028.6020300@netfilter.org> (raw)
In-Reply-To: <4A250DDA.1010406@trash.net>
Patrick McHardy wrote:
> Jozsef Kadlecsik wrote:
>> Hi Patrick,
>>
>> The patch below adds supporting TCP simultaneous open to conntrack.
>> The unused LISTEN state is replaced by a new state (SYN_SENT2)
>> denoting the second SYN sent from the reply direction in the new case.
>> The state table is updated and the function tcp_in_window is modified
>> to handle simultaneous open.
>>
>> The functionality can fairly easily be tested by socat. A sample
>> tcpdump recording
>> ...
>> and the corresponding netlink events:
>>
>> [NEW] tcp 6 120 SYN_SENT src=192.168.0.254 dst=192.168.0.1
>> sport=2020 dport=2020 [UNREPLIED] src=192.168.0.1 dst=192.168.0.254
>> sport=2020 dport=2020
>> [UPDATE] tcp 6 120 LISTEN src=192.168.0.254 dst=192.168.0.1
>> sport=2020 dport=2020 src=192.168.0.1 dst=192.168.0.254 sport=2020
>> dport=2020
>> [UPDATE] tcp 6 60 SYN_RECV src=192.168.0.254 dst=192.168.0.1
>> sport=2020 dport=2020 src=192.168.0.1 dst=192.168.0.254 sport=2020
>> dport=2020
>> [UPDATE] tcp 6 432000 ESTABLISHED src=192.168.0.254
>> dst=192.168.0.1 sport=2020 dport=2020 src=192.168.0.1
>> dst=192.168.0.254 sport=2020 dport=2020 [ASSURED]
>>
>> The RST packet was dropped in the raw table, thus it did not reach
>> conntrack. nfnetlink_conntrack is unpatched so it shows the new
>> SYN_SENT2 state as the old unused LISTEN.
>>
>> With TCP simultaneous open support we satisfy REQ-2 in RFC 5382 ;-).
>>
>> Additional minor correction in this patch is that in order to catch
>> uninitialized reply directions, "td_maxwin == 0" is used instead of
>> "td_end == 0" because the former can't be true except in uninitialized
>> state while td_end may accidentally be equal to zero in the mid of a
>> connection.
>
> Thanks Jozsef. Just one question:
>
>> - TCP_CONNTRACK_LISTEN,
>> + TCP_CONNTRACK_SYN_SENT2,
>
> is this constant already used in userspace? From your conntrack
> output above I'd assume the answer is yes, so we should keep it
> around as an alias to avoid compilation errors.
libnetfilter_conntrack keeps its own copy of it in user-space. libnl
seems not to do it, so the alias would be a good idea.
--
"Los honestos son inadaptados sociales" -- Les Luthiers
next prev parent reply other threads:[~2009-06-02 12:28 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-31 14:28 [PATCH] TCP simultaneous open support Jozsef Kadlecsik
2009-05-31 14:33 ` Jozsef Kadlecsik
2009-05-31 23:04 ` Saatvik Agarwal
2009-05-31 23:50 ` Jan Engelhardt
2009-06-01 0:50 ` Saatvik Agarwal
2009-06-02 8:41 ` Jozsef Kadlecsik
2009-06-02 12:02 ` Patrick McHardy
2009-06-02 12:09 ` Jozsef Kadlecsik
2009-06-02 12:12 ` Patrick McHardy
2009-06-02 11:32 ` Patrick McHardy
2009-06-02 11:42 ` Pablo Neira Ayuso [this message]
2009-06-02 11:51 ` Jozsef Kadlecsik
2009-06-02 11:53 ` Patrick McHardy
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=4A251028.6020300@netfilter.org \
--to=pablo@netfilter.org \
--cc=kaber@trash.net \
--cc=kadlec@blackhole.kfki.hu \
--cc=netfilter-devel@vger.kernel.org \
--cc=saatvik.agarwal@stanford.edu \
/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.