]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Track priorities for default action return
authorAlan T. DeKok <aland@freeradius.org>
Fri, 8 Feb 2013 17:08:01 +0000 (12:08 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 8 Feb 2013 17:09:26 +0000 (12:09 -0500)
If the default action is return, take it ONLY if we're at priority 0

src/main/modcall.c

index 83037efb7e8b0692dd4dce6251bc87a7f5401ce7..88213469c3e15a145577462e11317e20f9545223 100644 (file)
@@ -663,7 +663,7 @@ int modcall(int component, modcallable *c, REQUEST *request)
                                       child->name ? child->name : "",
                                       fr_int2str(rcode_table,
                                                    stack.result[stack.pointer],
-                                                   "??"));
+                                                 "??"));
                                goto do_return;
                        }
 
@@ -690,7 +690,7 @@ int modcall(int component, modcallable *c, REQUEST *request)
                RDEBUG2("%.*s[%s] returns %s",
                       stack.pointer + 1, modcall_spaces,
                       child->name ? child->name : "",
-                      fr_int2str(rcode_table, myresult, "??"));
+                       fr_int2str(rcode_table, myresult, "??"));
 
                /*
                 *      This is a bit of a hack...
@@ -724,7 +724,8 @@ int modcall(int component, modcallable *c, REQUEST *request)
                /*
                 *      The child's action says return.  Do so.
                 */
-               if (child->actions[myresult] == MOD_ACTION_RETURN) {
+               if ((child->actions[myresult] == MOD_ACTION_RETURN) &&
+                   (mypriority == 0)) {
                        stack.result[stack.pointer] = myresult;
                        stack.children[stack.pointer] = NULL;
                        goto do_return;
@@ -822,7 +823,7 @@ int modcall(int component, modcallable *c, REQUEST *request)
                               stack.pointer + 1, modcall_spaces,
                               group_name[parent->type],
                               parent->name ? parent->name : "",
-                              fr_int2str(rcode_table, myresult, "??"));
+                               fr_int2str(rcode_table, myresult, "??"));
 
 #ifdef WITH_UNLANG
                        if ((parent->type == MOD_IF) ||