Hugh Messenger (that's me!) said:
Alan DeKok said:
DEFAULT Called-Station-Id =~ "^(\w+_pppoe_\d+)$", Pool-Name := `%{1}`
\w && \d may not be supported by the regex library on your system. You may have to use [a-fA-F] etc. explictely.
I don't seem to be able to get this to work. This is my DEFAULT entry:
DEFAULT Called-Station-Id =~ "^([A-z0-9]+_pppoe_[0-9]+)$", Pool-Name := `%{1}` Framed-IP-Netmask = 255.255.0.0, Fall-Through = 1
... and it seems to be matching on authentication requests, as per this -X fragment:
users: Matched entry DEFAULT at line 162
... where line 162 is the above DEFAULT. And I've triple checked my regexp using my IDE's RX toolkit. But sqlippool isn't picking up that pattern match as the pool name:
rlm_sql_mysql: query: SELECT FramedIPAddress FROM radippool WHERE pool_name = '' AND expiry_time < NOW() ORDER BY pool_name, (UserName <> 'radiustest'), (CallingStationId <> '00:60:B3:45:6A:98'), expiry_time LIMIT 1 FOR UPDATE sqlippool_query1: SQL query did not return any results
If I replace the regexp version with a specific one, like ...
DEFAULT Called-Station-Id == "brantley_pppoe_141", Pool-Name := "brantley_pppoe_141"
... it all works fine.
*bump* I hate to bump my question like this, but I think it may have gotten lost in a flurry of activity that day. And I really would like to get this working. TIA for any suggestions. -- hugh