Multiple NAS-IP-Address check attributes in FreeRadius 3.x
In 2.x I can add a attributes in radcheck table use the =~ operator, and a regex xxx.xxx.xxx.1|xxx.xxx.xxx.2 insert into radcheck (username,attribute,op,value) values ('username','NAS-IP-Address','=~','xxx.xxx.xxx.1|=xxx.xxx.xxx.2'); but in 3.x it failed, follow is error message (1) sql: ERROR: Error parsing value: Failed resolving "=xxx.xxx.xxx.1|=xxx.xxx.xxx.2" to IPv4 address: Name or service not known (1) sql: ERROR: Error parsing user data from database result (1) sql: ERROR: Error getting check attributes what can I do?
On Dec 3, 2021, at 10:55 AM, Jackie <dark17@126.com> wrote:
In 2.x I can add a attributes in radcheck table use the =~ operator, and a regex xxx.xxx.xxx.1|xxx.xxx.xxx.2 ... but in 3.x it failed, follow is error message
(1) sql: ERROR: Error parsing value: Failed resolving "=xxx.xxx.xxx.1|=xxx.xxx.xxx.2" to IPv4 address: Name or service not known
Yes. That functionality was removed in 3.0
what can I do?
Rewrite the rules in `unlang`. Unfortunately, in order to support new features in v3, it was hard to keep the regex support in SQL. Alan DeKok.
participants (2)
-
Alan DeKok -
Jackie