diff options
author | Klement Sekera <ksekera@cisco.com> | 2021-06-22 15:56:36 +0200 |
---|---|---|
committer | Ole Tr�an <otroan@employees.org> | 2021-06-23 17:18:35 +0000 |
commit | e506fbc9fef063e437425f5c7f2d9b1e26d90766 (patch) | |
tree | 56119f94ee96b4e6d2733ade1a6643a44ae993cd /src/plugins/nat/nat44-ed/nat44_ed_in2out.c | |
parent | da5088c9306cafbe71e90f7ebd8a411488afb121 (diff) |
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 <ksekera@cisco.com>
Change-Id: I035debccf966d7dbd63c364cb1e43380d641f708
Diffstat (limited to 'src/plugins/nat/nat44-ed/nat44_ed_in2out.c')
-rw-r--r-- | src/plugins/nat/nat44-ed/nat44_ed_in2out.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/nat/nat44-ed/nat44_ed_in2out.c b/src/plugins/nat/nat44-ed/nat44_ed_in2out.c index 426b6eeba5c..f7257db789f 100644 --- a/src/plugins/nat/nat44-ed/nat44_ed_in2out.c +++ b/src/plugins/nat/nat44-ed/nat44_ed_in2out.c @@ -1183,7 +1183,7 @@ nat44_ed_in2out_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_i2o ( sm, b0, ip0, f, proto0, is_output_feature))) { nat_free_session_data (sm, s0, thread_index, 0); @@ -1331,7 +1331,7 @@ nat44_ed_in2out_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_i2o ( sm, b0, ip0, &s0->i2o, proto0, is_output_feature))) { goto trace0; @@ -1349,7 +1349,7 @@ nat44_ed_in2out_slow_path_node_fn_inline (vlib_main_t *vm, now, thread_index, proto0, &s0, is_multi_worker); 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_i2o ( sm, b0, ip0, &s0->i2o, proto0, is_output_feature))) { goto trace0; @@ -1426,7 +1426,7 @@ nat44_ed_in2out_slow_path_node_fn_inline (vlib_main_t *vm, b0->flags |= VNET_BUFFER_F_IS_NATED; if (NAT_ED_TRNSL_ERR_SUCCESS != - (translation_error = nat_6t_flow_buf_translate ( + (translation_error = nat_6t_flow_buf_translate_i2o ( sm, b0, ip0, &s0->i2o, proto0, is_output_feature))) { nat_free_session_data (sm, s0, thread_index, 0); |