nat: TCP state tracking based on RFC 7857/RFC 6146 77/34877/15
authorKlement Sekera <ksekera@cisco.com>
Mon, 10 Jan 2022 21:57:27 +0000 (21:57 +0000)
committerOle Tr�an <otroan@employees.org>
Mon, 24 Jan 2022 12:59:46 +0000 (12:59 +0000)
commit56c492aa0502751de2dd9d890096a82c5f04776d
treea2b8a1c300853070b26f9953a10bd1a4e41f3bdd
parent4634d02501235d3803a17839eeaf076110abcb18
nat: TCP state tracking based on RFC 7857/RFC 6146

Implement proper state machine based on above RFCs. ACKs to SYNs/FINs
are no longer required/tracked. This is more friendly to peers and
accounts for lost packets and retransmits.

This change also means that all traffic is translated and forwarded
while in transitory timeout, which helps delivering e.g. retransmitted
FINs, FINACKs and other messages.

Also support reopening a session in transitory timeout after seeing both
FINs by seeing both SYNs again. This helps quick connection
reestablishment if the peers want to.

Type: improvement
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Signed-off-by: Miklos Tirpak <miklos.tirpak@gmail.com>
Change-Id: Ibf521c79463472db97e593bfa02b32b4a06dfd2a
12 files changed:
src/plugins/nat/lib/log.h
src/plugins/nat/nat44-ed/nat44_ed.c
src/plugins/nat/nat44-ed/nat44_ed.h
src/plugins/nat/nat44-ed/nat44_ed_api.c
src/plugins/nat/nat44-ed/nat44_ed_cli.c
src/plugins/nat/nat44-ed/nat44_ed_format.c
src/plugins/nat/nat44-ed/nat44_ed_in2out.c
src/plugins/nat/nat44-ed/nat44_ed_inlines.h
src/plugins/nat/nat44-ed/nat44_ed_out2in.c
src/plugins/nat/nat44-ed/tcp_conn_track.rst [new file with mode: 0644]
test/framework.py
test/test_nat44_ed.py