summaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2024-03-08 19:25:42 -0800
committerFlorin Coras <florin.coras@gmail.com>2024-03-09 04:29:33 +0000
commit91bfe5b658b14acdbecf7a0f357bfafaf1124c66 (patch)
tree30e70c8ea7787b2f04c5211fc8e0a9d83082796c /src/vnet
parent4c7305f124cfa9c649ec6c9231eaf608fe336f1b (diff)
session: fix port alloc for fixed lcl port reuse
Type: fix Change-Id: If30d1aa8aa752ae4bddde776832a3009ebc7e316 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/session/transport.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/vnet/session/transport.c b/src/vnet/session/transport.c
index 0012ba288bf..e6eb9d7ee3b 100644
--- a/src/vnet/session/transport.c
+++ b/src/vnet/session/transport.c
@@ -740,8 +740,9 @@ transport_alloc_local_endpoint (u8 proto, transport_endpoint_cfg_t * rmt_cfg,
return 0;
/* IP:port pair already in use, check if 6-tuple available */
- if (session_lookup_connection (rmt->fib_index, lcl_addr, &rmt->ip, port,
- rmt->port, proto, rmt->is_ip4))
+ if (session_lookup_connection (rmt->fib_index, lcl_addr, &rmt->ip,
+ rmt_cfg->peer.port, rmt->port, proto,
+ rmt->is_ip4))
return SESSION_E_PORTINUSE;
/* 6-tuple is available so increment lcl endpoint refcount */