From eb422d99d547dc647c72bd93e73ebf9750f3408e Mon Sep 17 00:00:00 2001 From: Nick Porter Date: Wed, 6 Aug 2025 15:54:01 +0100 Subject: [PATCH] Use the thread source port range, rather than the instance --- src/modules/rlm_radius/bio.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/modules/rlm_radius/bio.c b/src/modules/rlm_radius/bio.c index 29050b68a6..19ae7830c8 100644 --- a/src/modules/rlm_radius/bio.c +++ b/src/modules/rlm_radius/bio.c @@ -2892,8 +2892,8 @@ static xlat_action_t xlat_radius_client(UNUSED TALLOC_CTX *ctx, UNUSED fr_dcurso /* * Track which connections are made to this home server from which open ports. */ - if ((inst->fd_config.src_port_start > 0) && (inst->fd_config.src_port_end > 0)) { - num_ports = inst->fd_config.src_port_end - inst->fd_config.src_port_start; + if ((thread->ctx.fd_config.src_port_start > 0) && (thread->ctx.fd_config.src_port_end > 0)) { + num_ports = thread->ctx.fd_config.src_port_end - thread->ctx.fd_config.src_port_start + 1; } MEM(home = (home_server_t *) talloc_zero_array(thread, uint8_t, sizeof(home_server_t) + sizeof(connection_t *) * num_ports)); @@ -2918,10 +2918,10 @@ static xlat_action_t xlat_radius_client(UNUSED TALLOC_CTX *ctx, UNUSED fr_dcurso }; /* - * Copy the home server configuration from the root configuration. Then update it with + * Copy the home server configuration from the thread configuration. Then update it with * the needs of the home server. */ - home->ctx.fd_config = inst->fd_config; + home->ctx.fd_config = thread->ctx.fd_config; home->ctx.fd_config.type = FR_BIO_FD_CONNECTED; home->ctx.fd_config.dst_ipaddr = ipaddr->vb_ip; home->ctx.fd_config.dst_port = port->vb_uint32; -- 2.47.2