OUR SITES NetworkRADIUS FreeRADIUS

Alternation Syntax

The v3 alternation syntax of %{foo:-bar} is no longer necessary, and has been removed.

The new approach is simpler and clearer: just use short-circuit || in an expression. This approach also means that nested alternation is no longer necessary.

Old Style - no longer supported
&Reply-Message := "Hello %{%{User-Name}:-none}"
&Reply-Message := "Hello %{%{NAS-Identifer}:-%{%{User-Name}:-none}}"
New Alternation
&Reply-Message := "Hello %{&User-Name || 'none'}"
&Reply-Message := "Hello %{&NAS-Identifier || &User-Name || 'none'}"

Any strings in an alternation like above must be quoted. Numbers and IP addresses do not need to be quoted.