summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKlement Sekera <klement.sekera@gmail.com>2022-03-08 20:13:57 +0100
committerOle Tr�an <otroan@employees.org>2022-03-17 11:17:49 +0000
commitc2feb65f4288cb4f3aa1e61d44826dbb5675063b (patch)
treefbd51204afdd4f3be9a3897731b3adfc8b3cd738 /src
parent541de587a948225a8e66f970dc7a1640ed8e9bb9 (diff)
nat: fix ICMP error translation
Add missing translation of ICMP inner IP layer. Change responsible test so that it actually tests something. Type: fix Fixes: 4881cb4c6f Signed-off-by: Klement Sekera <klement.sekera@gmail.com> Change-Id: Id3a6f12a7308d81b1cdf9815f857221fab2f24d9
Diffstat (limited to 'src')
-rw-r--r--src/plugins/nat/nat44-ed/nat44_ed.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/nat/nat44-ed/nat44_ed.c b/src/plugins/nat/nat44-ed/nat44_ed.c
index b67a247358a..8f356430e20 100644
--- a/src/plugins/nat/nat44-ed/nat44_ed.c
+++ b/src/plugins/nat/nat44-ed/nat44_ed.c
@@ -3801,6 +3801,9 @@ nat_6t_flow_icmp_translate (vlib_main_t *vm, snat_main_t *sm, vlib_buffer_t *b,
icmp->checksum = new_icmp_sum;
break;
case IP_PROTOCOL_ICMP:
+ nat_6t_flow_ip4_translate (sm, b, inner_ip, f, inner_proto,
+ 1 /* is_icmp_inner_ip4 */,
+ 0 /* skip_saddr_rewrite */);
if (f->ops & NAT_FLOW_OP_ICMP_ID_REWRITE)
{
icmp46_header_t *inner_icmp = ip4_next_header (inner_ip);