Matching a prefix in huntgroups file
Alan DeKok
aland at deployingradius.com
Thu Nov 10 22:50:50 CET 2016
On Nov 10, 2016, at 12:31 PM, Brian Candler <b.candler at pobox.com> wrote:
>
> On 09/11/2016 19:44, Alan DeKok wrote:
>> So... &Foo is *always* an attribute reference. /foo/ is *always* a regex. "foo" is *always* an expanded string. 'foo' is *always* a constant string. And bare words are... of the devil.
> It seems to me that bare numbers, and bare ipv4/ipv6 addresses and prefixes, could be recognised as such by the lexical analyser pretty easily. If you want the string "345" or "1.2.3.4" instead, then you put quotes around it.
Numerical IPv4 addresses have large overlap with hostnames.
As I've said repeatedly, it's just not possible to do this right, all of the time. *NOT* doing it badly is better than doing it badly.
> If you wanted, there could be something like Service-Type::Login-User as an explicit way to select an enumeration value. That is: any bare-word which doesn't look like a number or IP address is an enumeration, and the attribute qualifier is optional if the LHS is an attribute.
Please look at the code and see how "simple" this is. It's not.
> Bikeshed: I did think that "$" or "@" would look more natural as a way to access the value of an attribute :-)
$ was already used. @ is used by other languages for different things. & is a compromise.
Alan DeKok.
More information about the Freeradius-Users
mailing list