Parsing the multiple attributes with same name

denizaydin deniz.aydin at
Tue Oct 4 12:47:23 CEST 2011


Cisco ISG uses same attribute with different value's for multiple purposes.
The value format defines the usages!. 
Like ; 
Cisco-Account-Info attribute with value beginning with V represent accouting
cookie and value beginning with S defines session identifier. 

For parsing the Cisco-Account-Info, I have wrote some unlang expression but
I don't know it's the best way for freeradius performance. This makes a loop
for every Cisco-Account-Info attribute. Is there any other ways that you can

                if ("%{request:Cisco-Account-Info[*]}" =~
/(^|\n)(S([^\n]*))/) { 
            update request { 
                Cisco-Account-Info-Subscriber-Identifier := "%{3}" 
                if ("%{request:Cisco-Account-Info[*]}" =~
/(^|\n)(V([^\n]*))/) { 
            update request { 
                Cisco-Account-Info-Accounting-Cookie := "%{3}" 
                if ("%{request:Cisco-Service-Info[*]}" =~
/(^|\n)(N([^\n]*))/) { 
            update request { 
                Cisco-Service-Info-Service-Name := "%{3}" 

Senior Network Engineer

View this message in context:
Sent from the FreeRadius - User mailing list archive at

More information about the Freeradius-Users mailing list