Matching a prefix in huntgroups file

Arran Cudbard-Bell a.cudbardb at freeradius.org
Wed Nov 9 20:41:29 CET 2016


> On Nov 9, 2016, at 2:32 PM, Phil Mayers <p.mayers at imperial.ac.uk> wrote:
> 
> On 09/11/2016 16:30, Alan DeKok wrote:
> 
>> For the second example, you have to guess that the LHS is a CIDR?
>> Parsing random strings *correctly* is hard.
> 
> No absolutely not. Magic typing is the work of the devil. You force the author to cast an untyped LHS and bomb out if the cast fails - at compile time for constants, runtime for dynamics:
> 
> if ('10.254.0.0/16'::ipaddress contains &NAS-IP-Address)
> 
> if (&Tmp-String-0::ipaddress ...)
> 
> OT: remind me why & is now a thing in front of unlang attribute names, as opposed to defining barewords as attributes?

Because barewords were also used for enumeration values and the ambiguity was annoying.

-Arran

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20161109/65f9321f/attachment.sig>


More information about the Freeradius-Users mailing list