]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
define new / add / deny client sections
authorAlan T. DeKok <aland@freeradius.org>
Thu, 22 Jun 2023 15:39:29 +0000 (11:39 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 22 Jun 2023 16:26:54 +0000 (12:26 -0400)
They don't do anything, but that will come

src/process/radius/base.c

index 8e8779485fad2449d9d41889884eadc954c75cdd..32a1ed0c8aa3e59fb9136ccfd5e12fffa342d8c4 100644 (file)
@@ -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
 };