Matching a value within an IP subnet
B.Candler at pobox.com
Tue Oct 19 17:23:22 CEST 2010
On Tue, Oct 19, 2010 at 02:11:06PM +0200, Alan DeKok wrote:
> > Does FreeRADIUS let me treat it as if it
> > were a string?
> The operator you have chosen to use is: "=~".
This was more of a "wish" than an actual usage. The question I meant was: is
there any sort of operator to match an IP address against a subnet? And =~
was acting as a meta-operator.
> > DEFAULT NAS-IP-Address =~ /^192\.0\.2\.([0-9]|1[0-9]|2[0-9]|3)$/, NAS-Group := "ADSL-BRAS"
> That should work.
OK, it's ugly, but it may suffice.
Thanks for your help,
More information about the Freeradius-Users