On 9 Sep 2015, at 19:14, Arran Cudbard-Bell <a.cudbardb@freeradius.org> wrote:
On 9 Sep 2015, at 18:55, Matthew Newton <mcn4@leicester.ac.uk> wrote:
On Wed, Sep 09, 2015 at 06:03:43PM +0100, Arran Cudbard-Bell wrote:
("%{rand}" expansion crashed out during expansion upon incoming packet).
What kind of misconfiguration?
Exactly the above - %{rand} and %{randstr} segfault on expansion, %{rand:10} and %{randstr:ccccc} are fine.
In v3.1.x I get
/usr/local/freeradius/etc/raddb/sites-enabled/default[39]: Failed parsing expanded string: /usr/local/freeradius/etc/raddb/sites-enabled/default[39]: %{rand} /usr/local/freeradius/etc/raddb/sites-enabled/default[39]: ^ Unknown attribute
Which is correct. But yes, crashes with v3.0.x because a NULL fmt pointer gets passed to the xlat function.
Ah because my v3.1.x config has rlm_expr stripped out, doh! Not sure what the intent behind this virtual attribute code is, it doesn't seem to be used for actual attributes AFAICT, and re-using the xlat tree without a field to distinguish between virtual attributes and functions is a bad idea, as evidenced by this bug. Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS development team FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2