]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Make redundant work with "timeout"
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 30 Apr 2025 19:18:03 +0000 (15:18 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 30 Apr 2025 20:22:52 +0000 (16:22 -0400)
src/lib/unlang/compile.c
src/tests/keywords/timeout.attrs [deleted file]

index 5ad79d318a047197794fa3ec9bb4004da7692ca1..4ce5372ccd4081ce30ea0a52627fbfb6f3c4e3f1 100644 (file)
@@ -588,16 +588,17 @@ static void compile_action_defaults(unlang_t *c, unlang_compile_t *unlang_ctx)
        if (c->parent &&
            ((c->parent->type == UNLANG_TYPE_REDUNDANT) || (c->parent->type == UNLANG_TYPE_REDUNDANT_LOAD_BALANCE))) {
                for (i = 0; i < RLM_MODULE_NUMCODES; i++) {
-                       if (i == RLM_MODULE_FAIL) {
+                       switch (i) {
+                       case RLM_MODULE_FAIL:
+                       case RLM_MODULE_TIMEOUT:
                                if (!c->actions.actions[i]) {
                                        c->actions.actions[i] = 1;
                                }
-
                                continue;
-                       }
 
-                       if (!c->actions.actions[i]) {
-                               c->actions.actions[i] = MOD_ACTION_RETURN;
+                       default:
+                               if (!c->actions.actions[i]) c->actions.actions[i] = MOD_ACTION_RETURN;
+                               break;
                        }
                }
 
diff --git a/src/tests/keywords/timeout.attrs b/src/tests/keywords/timeout.attrs
deleted file mode 100644 (file)
index 3e34f0b..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-#
-#  Input packet
-#
-Packet-Type = Access-Request
-User-Name = "bob"
-User-Password = "hello"
-
-#
-#  Expected answer
-#
-Packet-Type == Do-Not-Respond