]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
if we dereference it as a group, it has to be defined as a group
authorAlan T. DeKok <aland@freeradius.org>
Fri, 11 Oct 2019 17:56:29 +0000 (13:56 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 11 Oct 2019 18:04:02 +0000 (14:04 -0400)
src/lib/unlang/subrequest.c

index eed4ec91497fc60c6098f1863ea80b8acabead72..673e1f6301ba8b032a398b3b304fdee0180a868b 100644 (file)
@@ -399,20 +399,22 @@ void unlang_subrequest_free(REQUEST **child)
        *child = NULL;
 }
 
-static unlang_t subrequest_instruction = {
-       .type = UNLANG_TYPE_SUBREQUEST,
-       .name = "subrequest",
-       .debug_name = "subrequest",
-       .actions = {
-               [RLM_MODULE_REJECT]     = 0,
-               [RLM_MODULE_FAIL]       = MOD_ACTION_RETURN,    /* Exit out of nested levels */
-               [RLM_MODULE_OK]         = 0,
-               [RLM_MODULE_HANDLED]    = 0,
-               [RLM_MODULE_INVALID]    = 0,
-               [RLM_MODULE_DISALLOW]   = 0,
-               [RLM_MODULE_NOTFOUND]   = 0,
-               [RLM_MODULE_NOOP]       = 0,
-               [RLM_MODULE_UPDATED]    = 0
+static unlang_group_t subrequest_instruction = {
+       .self = {
+               .type = UNLANG_TYPE_SUBREQUEST,
+               .name = "subrequest",
+               .debug_name = "subrequest",
+               .actions = {
+                       [RLM_MODULE_REJECT]     = 0,
+                       [RLM_MODULE_FAIL]       = MOD_ACTION_RETURN,    /* Exit out of nested levels */
+                       [RLM_MODULE_OK]         = 0,
+                       [RLM_MODULE_HANDLED]    = 0,
+                       [RLM_MODULE_INVALID]    = 0,
+                       [RLM_MODULE_DISALLOW]   = 0,
+                       [RLM_MODULE_NOTFOUND]   = 0,
+                       [RLM_MODULE_NOOP]       = 0,
+                       [RLM_MODULE_UPDATED]    = 0
+               },
        },
 };
 
@@ -441,7 +443,7 @@ void unlang_subrequest_push(rlm_rcode_t *out, REQUEST *child,
        /*
         *      Push a new subrequest frame onto the stack
         */
-       unlang_interpret_push(child->parent, &subrequest_instruction, RLM_MODULE_UNKNOWN, UNLANG_NEXT_STOP, top_frame);
+       unlang_interpret_push(child->parent, &subrequest_instruction.self, RLM_MODULE_UNKNOWN, UNLANG_NEXT_STOP, top_frame);
        frame = &stack->frame[stack->depth];
 
        /*