callingstationid filter and regexp

Bjørn Mork bjorn at mork.no
Thu Apr 20 14:39:31 CEST 2006


Miguel <mmiranda at 123.com.sv> writes:

> radius=# select * from radcheck where username = 'mmiranda';
>   id    | username |     attribute      | op |                 value
> ---------+----------+--------------------+----+---------------------------------------
> 1706382 | mmiranda | Calling-Station-Id | ~= |
> 226601[0-9][0-9]$|22793045$|22934240$
> 1706381 | mmiranda | User-Password      | == | americatel
> (2 rows)
>
>
> Wed Apr 19 11:32:14 2006 : Auth: Login incorrect:
> [mmiranda/americatel] (from client private-network port 0 cli 22660124)
> Wed Apr 19 11:32:15 2006 : Info: rlm_sql (sql): No matching entry in
> the database for request from user [mmiranda]

That's weird.  I don't know the FreeRadius regexp internals, but the
re work as expected when I test it with perl:

bjorn at obelix:~$ perl -e 'foreach (@ARGV) {print "$_\n" if /226601[0-9][0-9]$|22793045$|22934240$/}' 22660124 22793045 50322793045 227930453 22666666
22660124
22793045
50322793045


Bjørn




More information about the Freeradius-Users mailing list