t->is_slow_path ? "NAT44_IN2OUT_ED_SLOW_PATH" :
"NAT44_IN2OUT_ED_FAST_PATH";
- s = format (s, "%s: sw_if_index %d, next index %d, session %d", tag,
- t->sw_if_index, t->next_index, t->session_index);
+ s = format (s, "%s: sw_if_index %d, next index %d", tag, t->sw_if_index,
+ t->next_index);
if (~0 != t->session_index)
{
- s = format (s, ", translation result '%U' via %s",
- format_nat_ed_translation_error, t->translation_error,
+ s = format (s, ", session %d, translation result '%U' via %s",
+ t->session_index, format_nat_ed_translation_error,
+ t->translation_error,
t->translation_via_i2of ? "i2of" : "o2if");
s = format (s, "\n i2of %U", format_nat_6t_flow, &t->i2of);
s = format (s, "\n o2if %U", format_nat_6t_flow, &t->o2if);
fib_table_get_index_for_sw_if_index (FIB_PROTOCOL_IP4, sw_if_index0);
lookup.fib_index = rx_fib_index0;
- if (PREDICT_FALSE (ip0->ttl == 1))
+ if (PREDICT_FALSE (!is_output_feature && ip0->ttl == 1))
{
vnet_buffer (b0)->sw_if_index[VLIB_TX] = (u32) ~ 0;
icmp4_error_set_vnet_buffer (b0, ICMP4_time_exceeded,
skip_lookup:
+ ASSERT (thread_index == s0->thread_index);
+
if (PREDICT_FALSE (per_vrf_sessions_is_expired (s0, thread_index)))
{
// session is closed, go slow path
}
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);
rx_fib_index0 =
fib_table_get_index_for_sw_if_index (FIB_PROTOCOL_IP4, sw_if_index0);
- if (PREDICT_FALSE (ip0->ttl == 1))
+ if (PREDICT_FALSE (!is_output_feature && ip0->ttl == 1))
{
vnet_buffer (b0)->sw_if_index[VLIB_TX] = (u32) ~ 0;
icmp4_error_set_vnet_buffer (b0, ICMP4_time_exceeded,
if (!s0)
next[0] = NAT_NEXT_DROP;
- if (NAT_ED_TRNSL_ERR_SUCCESS !=
- (translation_error = nat_6t_flow_buf_translate (
- sm, b0, ip0, &s0->i2o, proto0, is_output_feature)))
+ if (NAT_NEXT_DROP != next[0] && s0 &&
+ NAT_ED_TRNSL_ERR_SUCCESS !=
+ (translation_error = nat_6t_flow_buf_translate_i2o (
+ sm, b0, ip0, &s0->i2o, proto0, is_output_feature)))
{
goto trace0;
}
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;
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);