2.2.1: if-block leads to reject

Alan DeKok aland at deployingradius.com
Mon Sep 30 21:42:46 CEST 2013


Jakob Hirsch wrote:
> It's a little odd that an empty if-section still returns a reject, i.e.
> 
> if (1) {
>   # nothing in here
> }

  Yes... it's a limitation of the underlying assumptions.

> 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 :)

  In v3, blocks which are never evaluated are silently deleted:

	...
	if (0) {
		blah1
		blah2
		blah3
	}
	...

  The entire "if" section will disappear from the running server, as if
it never existed.

  Alan DeKok.


More information about the Freeradius-Devel mailing list