From: Nick Porter Date: Thu, 20 Jun 2024 16:09:32 +0000 (+0100) Subject: Test attr_filter on reply list X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e3abd165489fbcabd6077501d3378bf853c7685b;p=thirdparty%2Ffreeradius-server.git Test attr_filter on reply list --- diff --git a/src/tests/modules/attr_filter/operators.unlang b/src/tests/modules/attr_filter/operators.unlang index 80176ca5334..1d8cace6970 100644 --- a/src/tests/modules/attr_filter/operators.unlang +++ b/src/tests/modules/attr_filter/operators.unlang @@ -1,3 +1,6 @@ +# Copy request to reply for later +&reply := &request + attr_filter if ((!&NAS-Port) || (&NAS-Port != 10)) { @@ -24,5 +27,24 @@ if ((&Calling-Station-Id != "bob") || (&Calling-Station-Id[1] != "jim") || (&Cal test_fail } +if (!&reply.Idle-Timeout) { + test_fail +} + +# +# Now apply the filter to the reply list +# +attr_filter.reply + +if (!&NAS-Port || &NAS-Port != 10) { + test_fail +} + +if (&reply.Idle-Timeout) { + test_fail +} + +&reply := {} + &control.Password.Cleartext := "goodbye" &reply.Reply-Message := &Reply-Message