From: Alan T. DeKok Date: Wed, 30 Nov 2016 13:30:38 +0000 (-0500) Subject: switch with no match and no default X-Git-Tag: release_3_0_13~96 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c79113385052d2f2b660eeee657435440846abf4;p=thirdparty%2Ffreeradius-server.git switch with no match and no default --- diff --git a/src/tests/keywords/switch-nodefault b/src/tests/keywords/switch-nodefault new file mode 100644 index 00000000000..5fb94699bc1 --- /dev/null +++ b/src/tests/keywords/switch-nodefault @@ -0,0 +1,22 @@ +# +# User-Name is "bob", and a switch statement +# with no "default" should not crash the server. +# +switch &User-Name { + case "doug" { + update reply { + Filter-Id := "doug" + } + } +} + +if (&reply:Filter-Id) { + update reply { + Filter-Id := "fail 1" + } +} +else { + update reply { + Filter-Id := "filter" + } +} \ No newline at end of file