From: Arran Cudbard-Bell Date: Wed, 30 Apr 2025 19:18:03 +0000 (-0400) Subject: Make redundant work with "timeout" X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9fd1a15784eb0e5b573106945138099fd5af1968;p=thirdparty%2Ffreeradius-server.git Make redundant work with "timeout" --- diff --git a/src/lib/unlang/compile.c b/src/lib/unlang/compile.c index 5ad79d318a..4ce5372ccd 100644 --- a/src/lib/unlang/compile.c +++ b/src/lib/unlang/compile.c @@ -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 index 3e34f0b728..0000000000 --- a/src/tests/keywords/timeout.attrs +++ /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