Matching a prefix in huntgroups file

Brian Candler b.candler at pobox.com
Mon Nov 7 11:52:52 CET 2016


On 06/11/2016 17:48, Alan DeKok wrote:
>    I am VERY wary of putting automagic casting rules in.

I absolutely agree: the more explicit and the less magic, the better. I 
would rather see an immediate failure with type error than silently 
continuing with unexpected behaviour.

I understand that in FreeRADIUS 4, to reference an attribute you will 
always have to include the '&'.  Are you also going to require that a 
string literal must be enclosed in double quotes? I think that would be 
a good idea. In particular, it would protect against accidentally 
missing an '&', which could otherwise mean that e.g.

    if (Service-Type == Login-User)   # missing '&'

is interpreted as

    if ("Service-Type" == "Login-User")   # -> always FALSE

But it also means that an unquoted literal like 1.2.3.4 or 1.2.3.4/30, 
even on the LHS, could be unambiguously parsed as an ipaddr or 
ipv4prefix respectively.

Regards,

Brian.


More information about the Freeradius-Users mailing list