]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Execute all the children of a timeout section ‽
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 12 Apr 2024 19:53:29 +0000 (13:53 -0600)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 12 Apr 2024 19:53:29 +0000 (13:53 -0600)
src/lib/unlang/timeout.c
src/tests/keywords/timeout

index 3f41f34ba084959638b41356a8ef12006615e8f5..a33421f8573e1eca48fee3cea415727d9dd35344 100644 (file)
@@ -93,7 +93,7 @@ static unlang_action_t unlang_timeout_set(rlm_rcode_t *p_result, request_t *requ
        frame_repeat(frame, unlang_timeout_resume_done);
        state->success = true;
 
-       return unlang_interpret_push_children(p_result, request, frame->result, UNLANG_NEXT_STOP);
+       return unlang_interpret_push_children(p_result, request, frame->result, UNLANG_NEXT_SIBLING);
 }
 
 static unlang_action_t unlang_timeout_xlat_done(rlm_rcode_t *p_result, request_t *request, unlang_stack_frame_t *frame)
index 776b91a36bfaaf853f06bcdf2a791050a8fb27a2..4765ed335af1c6b79c620b9d1e617e6e859ba4e5 100644 (file)
@@ -2,6 +2,8 @@
 # PRE: xlat-delay
 #
 float32 a
+bool b
+bool c
 
 #
 #  Set a timeout which will fire, and cause the block to fail.
@@ -13,7 +15,7 @@ redundant {
        }
 
        group {
-               success
+               ok
        }
 }
 
@@ -24,6 +26,20 @@ redundant {
        }
 
        group {
-               success
+               ok
        }
 }
+
+# Regression test - Only the first child of the timeout block was executed
+redundant {
+       timeout 1s {
+               &b = true
+               &c = true
+       }
+}
+
+if (!(&b && &c)) {
+       test_fail
+}
+
+success