summaryrefslogtreecommitdiffstats
path: root/src/vnet/udp
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2024-03-09 15:51:50 -0800
committerFlorin Coras <florin.coras@gmail.com>2024-03-10 00:13:01 +0000
commit236534136d5824bd29fd9842262b05e48111b2b2 (patch)
tree9d59d6e95ab00ea41cffcef201fea5cc32956a85 /src/vnet/udp
parent91bfe5b658b14acdbecf7a0f357bfafaf1124c66 (diff)
session: use no for ports in transport port allocator
Type: improvement Change-Id: Ia1d8aaa3c51938cfa15dd09102471f52ebe67a3d Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/udp')
-rw-r--r--src/vnet/udp/udp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vnet/udp/udp.c b/src/vnet/udp/udp.c
index 0a0247a5ef4..669dd03b34e 100644
--- a/src/vnet/udp/udp.c
+++ b/src/vnet/udp/udp.c
@@ -420,7 +420,7 @@ udp_open_connection (transport_endpoint_cfg_t * rmt)
lcl_port);
lcl_port =
transport_alloc_local_port (TRANSPORT_PROTO_UDP, &lcl_addr, rmt);
- if (lcl_port < 1)
+ if ((int) lcl_port < 1)
return SESSION_E_PORTINUSE;
}
}
@@ -432,7 +432,7 @@ udp_open_connection (transport_endpoint_cfg_t * rmt)
ip_copy (&uc->c_rmt_ip, &rmt->ip, rmt->is_ip4);
ip_copy (&uc->c_lcl_ip, &lcl_addr, rmt->is_ip4);
uc->c_rmt_port = rmt->port;
- uc->c_lcl_port = clib_host_to_net_u16 (lcl_port);
+ uc->c_lcl_port = lcl_port;
uc->c_is_ip4 = rmt->is_ip4;
uc->c_proto = TRANSPORT_PROTO_UDP;
uc->c_fib_index = rmt->fib_index;