Compile-time parsing of expansions

Alan DeKok aland at
Fri Mar 21 16:57:37 CET 2014

  We now have more compile-time syntax checks.  This means that the
server will complain if you get something wrong, and refuse to start.
Right now, it gets a run-time error when it parses the string.  That is
rather hard to see when it's running as a daemon...


Check RHS of update sections in pass2, for xlat syntax

	update reply {
		Filter-Id := "%{foo: bar}"

Will now get:

...Failed parsing expanded string %{foo: bar}
                                    ^ Unknown module


  MUCH nicer.  And only ~50 lines of code, too.

  The next set of changes cache the pre-compiled xlat structure.  This
means that the run-time is slightly faster, as it doesn't have to
re-parse the "%{foo: bar}" string for every single packet.

  Alan DeKok.

More information about the Freeradius-Devel mailing list