From: Florin Coras Date: Sat, 9 Mar 2024 03:25:42 +0000 (-0800) Subject: session: fix port alloc for fixed lcl port reuse X-Git-Tag: v24.10-rc0~182 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F92%2F40492%2F2;p=vpp.git session: fix port alloc for fixed lcl port reuse Type: fix Change-Id: If30d1aa8aa752ae4bddde776832a3009ebc7e316 Signed-off-by: Florin Coras --- 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 */