2.2.1: if-block leads to reject
Jakob Hirsch
jh at plonk.de
Tue Sep 24 18:42:43 CEST 2013
Hi,
Arran Cudbard-Bell, 2013-09-24 17:22:
> Have you tried
>
> ok
> if (1) {
> etc...
>
> ?
This actually works:
> +group Test {
> ++[ok] = ok
> ++? if (1)
> ? Evaluating (1) -> TRUE
> ++? if (1) -> TRUE
> ++if (1) {
> ++} # if (1) = ok
> ++[ok] = ok
> +} # group Test = ok
Now I know why there was a noop with our live config: We use a (custom)
module that returns noop, which is called first in our auth section.
It seems that the if-block "manifests" a previous return code in a way
that it cannot be overriden by a following ok/noop, but only if there is
no module called in the block itself. A ok in a following if-block will
override the return value, though.
Examples:
ok
if (1) {
}
noop
-> ok
ok
if (1) {
ok
}
noop
-> noop
if (1) {
}
ok
-> reject after the if-block
noop
if (1) {
}
ok
-> noop
noop
if (1) {
}
if (1) {
ok
}
-> ok
This looks quite strange to me...
Regards,
Jakob
More information about the Freeradius-Devel
mailing list