session: fix port alloc for fixed lcl port reuse

Type: fix

Change-Id: If30d1aa8aa752ae4bddde776832a3009ebc7e316
Signed-off-by: Florin Coras <fcoras@cisco.com>
This commit is contained in:
Florin Coras
2024-03-08 19:25:42 -08:00
committed by Florin Coras
parent 4c7305f124
commit 91bfe5b658

View File

@ -740,8 +740,9 @@ transport_alloc_local_endpoint (u8 proto, transport_endpoint_cfg_t * rmt_cfg,
return 0; return 0;
/* IP:port pair already in use, check if 6-tuple available */ /* IP:port pair already in use, check if 6-tuple available */
if (session_lookup_connection (rmt->fib_index, lcl_addr, &rmt->ip, port, if (session_lookup_connection (rmt->fib_index, lcl_addr, &rmt->ip,
rmt->port, proto, rmt->is_ip4)) rmt_cfg->peer.port, rmt->port, proto,
rmt->is_ip4))
return SESSION_E_PORTINUSE; return SESSION_E_PORTINUSE;
/* 6-tuple is available so increment lcl endpoint refcount */ /* 6-tuple is available so increment lcl endpoint refcount */