Brian Candler wrote:
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?
No.
As always, patches are welcome.
Alan DeKok.
-
List info/subscribe/unsubscribe? See
On Mon, Oct 18, 2010 at 02:51:25PM +0200, Alan DeKok wrote:
Brian Candler wrote:
DEFAULT NAS-IP-Address =~ 192.0.2.0/27, NAS-Group := ADSL-BRAS
I've had a look at paircmp() in src/lib/valuepair.c and can't see any logic
which might do this.
Nope. Write a regex to do the
Brian Candler wrote:
Indeed it is not. But NAS-IP-Address is (natively) not a string in RADIUS
either, it's a 4-byte integer.
To be pedantic: an IPv4 address.
Does FreeRADIUS let me treat it as if it
were a string?
The operator you have chosen to use is: =~.
That is defined as doing
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
Brian Candler wrote:
DEFAULT NAS-IP-Address =~ 192.0.2.0/27, NAS-Group := ADSL-BRAS
I've had a look at paircmp() in src/lib/valuepair.c and can't see any logic
which might do this.
Nope. Write a regex to do the matching. The above string after =~
is *not* a regex.
Alan
In clients.conf, you can match a whole subnet of source IPs with one rule:
client 192.0.2.0/27 {
secret = testing123-1
shortname = ADSL-BRAS
}
But is it possible to do the same to match a range of IPs in an attribute
like NAS-IP-Address? I want to tag a collection
6 matches
Mail list logo