From: Alan T. DeKok Date: Thu, 22 Jun 2023 15:39:29 +0000 (-0400) Subject: define new / add / deny client sections X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=042029b4bbce290b8359f9ebafecf0c68a115b51;p=thirdparty%2Ffreeradius-server.git define new / add / deny client sections They don't do anything, but that will come --- diff --git a/src/process/radius/base.c b/src/process/radius/base.c index 8e8779485fa..32a1ed0c8aa 100644 --- a/src/process/radius/base.c +++ b/src/process/radius/base.c @@ -127,6 +127,10 @@ typedef struct { CONF_SECTION *do_not_respond; CONF_SECTION *protocol_error; /* @todo - allow protocol error as a reject reply? */ + + CONF_SECTION *new_client; + CONF_SECTION *add_client; + CONF_SECTION *deny_client; } process_radius_sections_t; typedef struct { @@ -912,12 +916,12 @@ static unlang_action_t mod_process(rlm_rcode_t *p_result, module_ctx_t const *mc PROCESS_TRACE; - fr_assert(FR_RADIUS_PACKET_CODE_VALID(request->packet->code)); - request->component = "radius"; request->module = NULL; fr_assert(request->dict == dict_radius); + fr_assert(FR_RADIUS_PACKET_CODE_VALID(request->packet->code)); + UPDATE_STATE(packet); if (!state->recv) { @@ -1271,6 +1275,25 @@ static virtual_server_compile_t const compile_list[] = { .name2 = CF_IDENT_ANY, .component = MOD_AUTHENTICATE }, + + { + .name = "new", + .name2 = "client", + .component = MOD_AUTHORIZE, + .offset = PROCESS_CONF_OFFSET(new_client), + }, + { + .name = "add", + .name2 = "client", + .component = MOD_AUTHORIZE, + .offset = PROCESS_CONF_OFFSET(add_client), + }, + { + .name = "deny", + .name2 = "client", + .component = MOD_AUTHORIZE, + .offset = PROCESS_CONF_OFFSET(deny_client), + }, COMPILE_TERMINATOR };