2.2.1: if-block leads to reject

Jakob Hirsch jh at plonk.de
Sun Sep 29 23:14:37 CEST 2013


On 29.09.2013 15:19, Alan DeKok wrote:
>   Your test case should now work.

It does indeed. Thanks for the quick fixing. I will test tomorrow with
our live config.


It's a little odd that an empty if-section still returns a reject, i.e.

if (1) {
  # nothing in here
}

gives:

+group Test {
++? if (1)
? Evaluating (1) -> TRUE
++? if (1) -> TRUE
++if (1) {
++} # if (1) = reject
+} # group Test = reject


That's just like in previos versions, so it's no change of behaviour.
The only use-case for that I can think of is some kind of autogenerating
config system where someone uses $INCLUDE in an if-block. If the
included file happens to be empty, the result might be a little
surprising, and "surprising" is nothing you want in your system :)


Regards,
Jakob


More information about the Freeradius-Devel mailing list