X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fudp%2Fudp.c;h=493275006f701421d531fcf254e312cf1d7d8155;hb=5e6bc730efc64c1ccbaca765e99faab828b2f76c;hp=7147fa32657262eb0932c732d7beace9d0cfb5cd;hpb=c4d0f47faef33ff882642fc5de75d46719b98d5d;p=vpp.git diff --git a/src/vnet/udp/udp.c b/src/vnet/udp/udp.c index 7147fa32657..493275006f7 100644 --- a/src/vnet/udp/udp.c +++ b/src/vnet/udp/udp.c @@ -364,7 +364,8 @@ udp_open_connection (transport_endpoint_cfg_t * rmt) if (rv) return rv; - if (udp_is_valid_dst_port (lcl_port, rmt->is_ip4)) + if (udp_connection_port_used_extern (clib_net_to_host_u16 (lcl_port), + rmt->is_ip4)) { /* If specific source port was requested abort */ if (rmt->peer.port) @@ -375,7 +376,8 @@ udp_open_connection (transport_endpoint_cfg_t * rmt) } /* Try to find a port that's not used */ - while (udp_is_valid_dst_port (lcl_port, rmt->is_ip4)) + while (udp_connection_port_used_extern (clib_net_to_host_u16 (lcl_port), + rmt->is_ip4)) { transport_release_local_endpoint (TRANSPORT_PROTO_UDP, &lcl_addr, lcl_port);