From: Alan T. DeKok Date: Tue, 14 Feb 2023 12:41:10 +0000 (-0500) Subject: remove unused dynamic client code X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fc7fac717e9188259f613f57624294b2f6c4de48;p=thirdparty%2Ffreeradius-server.git remove unused dynamic client code --- diff --git a/src/listen/tacacs/proto_tacacs.c b/src/listen/tacacs/proto_tacacs.c index 80ce2451f98..f40649fcbf6 100644 --- a/src/listen/tacacs/proto_tacacs.c +++ b/src/listen/tacacs/proto_tacacs.c @@ -379,38 +379,6 @@ static ssize_t mod_encode(void const *instance, request_t *request, uint8_t *buf return 1; } - client = address->radclient; - fr_assert(client); - - /* - * Dynamic client stuff - */ - if (client->dynamic && !client->active) { - RADCLIENT *new_client; - - fr_assert(buffer_len >= sizeof(client)); - - /* - * Allocate the client. If that fails, send back a NAK. - * - * @todo - deal with NUMA zones? Or just deal with this - * client being in different memory. - * - * Maybe we should create a CONF_SECTION from the client, - * and pass *that* back to mod_write(), which can then - * parse it to create the actual client.... - */ - new_client = client_afrom_request(NULL, request); - if (!new_client) { - PERROR("Failed creating new client"); - buffer[0] = true; - return 1; - } - - memcpy(buffer, &new_client, sizeof(new_client)); - return sizeof(new_client); - } - /* * If the app_io encodes the packet, then we don't need * to do that. @@ -420,6 +388,9 @@ static ssize_t mod_encode(void const *instance, request_t *request, uint8_t *buf if (data_len > 0) return data_len; } + client = address->radclient; + fr_assert(client); + secret = client->secret; if (secret) secretlen = talloc_array_length(client->secret) - 1;