Skip to content

Commit

Permalink
Ensure CONF_SECTION used to create dynamic clients is visible
Browse files Browse the repository at this point in the history
So that %client(<attribute>) works the same for dynamic clients as
static ones
  • Loading branch information
ndptech committed Nov 15, 2024
1 parent d0962c4 commit dff97da
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/lib/io/master.c
Original file line number Diff line number Diff line change
Expand Up @@ -2465,6 +2465,7 @@ static ssize_t mod_write(fr_listen_t *li, void *packet_ctx, fr_time_t request_ti
COPY_FIELD(require_message_authenticator);
COPY_FIELD(limit_proxy_state);
COPY_FIELD(use_connected);
COPY_FIELD(cs);

// @todo - fill in other fields?

Expand All @@ -2473,7 +2474,12 @@ static ssize_t mod_write(fr_listen_t *li, void *packet_ctx, fr_time_t request_ti
radclient = client->radclient; /* laziness */
radclient->server_cs = inst->server_cs;
radclient->server = cf_section_name2(inst->server_cs);
radclient->cs = NULL;

/*
* Re-parent the conf section used to build this client
* so its lifetime is linked to the client
*/
talloc_steal(radclient, radclient->cs);

/*
* This is a connected socket, and it's just been
Expand Down

0 comments on commit dff97da

Please sign in to comment.