From e506fbc9fef063e437425f5c7f2d9b1e26d90766 Mon Sep 17 00:00:00 2001 From: Klement Sekera Date: Tue, 22 Jun 2021 15:56:36 +0200 Subject: nat: ICMP handling fixes If ICMP comes from a router on path, source address must not be rewritten in o2i path to avoid getting wrong checksum. Fix ICMP checksum computations. Type: fix Signed-off-by: Klement Sekera Change-Id: I035debccf966d7dbd63c364cb1e43380d641f708 --- src/plugins/nat/nat44-ed/nat44_ed_out2in.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/plugins/nat/nat44-ed/nat44_ed_out2in.c') diff --git a/src/plugins/nat/nat44-ed/nat44_ed_out2in.c b/src/plugins/nat/nat44-ed/nat44_ed_out2in.c index f14311a99e1..995260a2499 100644 --- a/src/plugins/nat/nat44-ed/nat44_ed_out2in.c +++ b/src/plugins/nat/nat44-ed/nat44_ed_out2in.c @@ -1026,7 +1026,7 @@ nat44_ed_out2in_fast_path_node_fn_inline (vlib_main_t * vm, } if (NAT_ED_TRNSL_ERR_SUCCESS != - (translation_error = nat_6t_flow_buf_translate ( + (translation_error = nat_6t_flow_buf_translate_o2i ( sm, b0, ip0, f, proto0, 0 /* is_output_feature */))) { next[0] = NAT_NEXT_DROP; @@ -1182,7 +1182,7 @@ nat44_ed_out2in_slow_path_node_fn_inline (vlib_main_t * vm, } if (NAT_NEXT_DROP != next[0] && s0 && NAT_ED_TRNSL_ERR_SUCCESS != - (translation_error = nat_6t_flow_buf_translate ( + (translation_error = nat_6t_flow_buf_translate_o2i ( sm, b0, ip0, &s0->o2i, proto0, 0 /* is_output_feature */))) { goto trace0; @@ -1201,7 +1201,7 @@ nat44_ed_out2in_slow_path_node_fn_inline (vlib_main_t * vm, if (NAT_NEXT_DROP != next[0] && s0 && NAT_ED_TRNSL_ERR_SUCCESS != - (translation_error = nat_6t_flow_buf_translate ( + (translation_error = nat_6t_flow_buf_translate_o2i ( sm, b0, ip0, &s0->o2i, proto0, 0 /* is_output_feature */))) { goto trace0; @@ -1311,7 +1311,7 @@ nat44_ed_out2in_slow_path_node_fn_inline (vlib_main_t * vm, } if (NAT_ED_TRNSL_ERR_SUCCESS != - (translation_error = nat_6t_flow_buf_translate ( + (translation_error = nat_6t_flow_buf_translate_o2i ( sm, b0, ip0, &s0->o2i, proto0, 0 /* is_output_feature */))) { next[0] = NAT_NEXT_DROP; -- cgit 1.2.3-korg