Cisco-AVPair regex
    Matthew Newton 
    mcn at freeradius.org
       
    Fri Feb 23 14:19:17 CET 2018
    
    
  
On Fri, 2018-02-23 at 11:56 +0000, Kylián Martin wrote:
> Here is the unlang snippet
> 
> device_regex = '^(http-tlv=){1}([\\][0-9]{1,3}){1,5}(.*)$'
> 
> regex_device_type {
>         if (&Cisco-AVPair) {
>                 foreach &Cisco-AVPair {
>                         if ("%{string:%{Foreach-Variable-0}}" =~
> /{policy.device_regex}/i) {
You're matching the text '{policy.device_regex}', not the defined
string.
Use ${policy.device_regex}
  if ("%{string:%{Foreach-Variable-0}}" =~ /${policy.device_regex}/i) {
-- 
Matthew
    
    
More information about the Freeradius-Users
mailing list