ip: add extended shallow reassembly 39/40839/8
authorKlement Sekera <[email protected]>
Fri, 19 Apr 2024 07:15:01 +0000 (09:15 +0200)
committerKlement Sekera <[email protected]>
Mon, 7 Oct 2024 14:39:42 +0000 (16:39 +0200)
commit860916617dde9fcc857f3542fbc55c67653638ca
treeab5c9ac442e8a1b6dbc06688a1d2932be72eae3d
parentdb7be85352a58ee3ef028a56cf66c0ac13975115
ip: add extended shallow reassembly

This patch adds some fixes and improvements:

Fixes bug where save_rewrite_length gets overwritten on reassembly
handoff.

Fixes bug where duplicate fragments could cause a reassembly context
to be lost, because the race losing thread would remove bihash entry
created by winning thread.

Improves tracing by adding more events.

Adds extended shallow reassembly. This is a toggleable option, which if
turned on will cause reassembly to wait for both first and last
fragments to calculate total IP payload length. Furthermore it'll store
a local copy of first fragment and necessary data to retrieve it in
vnet_buffer2. This allows downstream features to access full L3/L4
headers when dealing with fragments.

Type: fix
Change-Id: I81695070533410c5815291dbc65ea71c87e3ae05
Signed-off-by: Klement Sekera <[email protected]>
src/plugins/map/ip6_map_t.c
src/vnet/buffer.h
src/vnet/ip/ip6_to_ip4.h
src/vnet/ip/reass/ip4_sv_reass.c
src/vnet/ip/reass/ip4_sv_reass.h
src/vnet/ip/reass/ip6_sv_reass.c
src/vnet/ip/reass/ip6_sv_reass.h