X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fplugins%2Fnat%2Fin2out.c;h=10acf1872082c63f689ff377e485ad30ce13263f;hb=81767d71a943fcf1196867549a6b48122f259695;hp=7eaaab295446d565502be893caffefb9cfe38b5b;hpb=f126e746fc01c75bc99329d10ce9127b26b23814;p=vpp.git diff --git a/src/plugins/nat/in2out.c b/src/plugins/nat/in2out.c index 7eaaab29544..10acf187208 100755 --- a/src/plugins/nat/in2out.c +++ b/src/plugins/nat/in2out.c @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include #include @@ -264,10 +264,7 @@ slow_path (snat_main_t * sm, vlib_buffer_t * b0, }; nat44_is_idle_session_ctx_t ctx0; - nat44_session_try_cleanup (&ip0->src_address, rx_fib_index0, thread_index, - now); - - if (PREDICT_FALSE (maximum_sessions_exceeded (sm, thread_index))) + if (PREDICT_FALSE (nat44_maximum_sessions_exceeded (sm, thread_index))) { b0->error = node->errors[SNAT_IN2OUT_ERROR_MAX_SESSIONS_EXCEEDED]; nat_ipfix_logging_max_sessions (thread_index, sm->max_translations); @@ -1043,11 +1040,11 @@ snat_in2out_node_fn_inline (vlib_main_t * vm, * be able to use dhcp client on the outside interface */ if (PREDICT_FALSE - ((b0->flags & VNET_BUFFER_F_LOCALLY_ORIGINATED) - && proto0 == SNAT_PROTOCOL_UDP + (proto0 == SNAT_PROTOCOL_UDP && (vnet_buffer (b0)->ip.reass.l4_dst_port == clib_host_to_net_u16 - (UDP_DST_PORT_dhcp_to_server)))) + (UDP_DST_PORT_dhcp_to_server)) + && ip0->dst_address.as_u32 == 0xffffffff)) goto trace00; } else @@ -1251,11 +1248,11 @@ snat_in2out_node_fn_inline (vlib_main_t * vm, * be able to use dhcp client on the outside interface */ if (PREDICT_FALSE - ((b1->flags & VNET_BUFFER_F_LOCALLY_ORIGINATED) - && proto1 == SNAT_PROTOCOL_UDP + (proto1 == SNAT_PROTOCOL_UDP && (vnet_buffer (b1)->ip.reass.l4_dst_port == clib_host_to_net_u16 - (UDP_DST_PORT_dhcp_to_server)))) + (UDP_DST_PORT_dhcp_to_server)) + && ip1->dst_address.as_u32 == 0xffffffff)) goto trace01; } else @@ -1492,11 +1489,11 @@ snat_in2out_node_fn_inline (vlib_main_t * vm, * be able to use dhcp client on the outside interface */ if (PREDICT_FALSE - ((b0->flags & VNET_BUFFER_F_LOCALLY_ORIGINATED) - && proto0 == SNAT_PROTOCOL_UDP + (proto0 == SNAT_PROTOCOL_UDP && (vnet_buffer (b0)->ip.reass.l4_dst_port == clib_host_to_net_u16 - (UDP_DST_PORT_dhcp_to_server)))) + (UDP_DST_PORT_dhcp_to_server)) + && ip0->dst_address.as_u32 == 0xffffffff)) goto trace0; } else