From 860916617dde9fcc857f3542fbc55c67653638ca Mon Sep 17 00:00:00 2001 From: Klement Sekera Date: Fri, 19 Apr 2024 09:15:01 +0200 Subject: 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 --- src/plugins/map/ip6_map_t.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/plugins/map/ip6_map_t.c') diff --git a/src/plugins/map/ip6_map_t.c b/src/plugins/map/ip6_map_t.c index 51853d619e6..f8d894a013a 100644 --- a/src/plugins/map/ip6_map_t.c +++ b/src/plugins/map/ip6_map_t.c @@ -151,9 +151,8 @@ ip6_map_t_icmp (vlib_main_t * vm, vnet_buffer (p0)->map_t.map_domain_index); ctx0.d = d0; ctx0.sender_port = 0; - if (!ip6_get_port - (vm, p0, ip60, p0->current_length, NULL, &ctx0.sender_port, - NULL, NULL, NULL, NULL)) + if (!ip6_get_port (vm, p0, ip60, p0->current_length, NULL, + &ctx0.sender_port, NULL, NULL, NULL, NULL, NULL)) { // In case of 1:1 mapping, we don't care about the port if (!(d0->ea_bits_len == 0 && d0->rules)) -- cgit 1.2.3-korg