Parsing the multiple attributes with same name
Hi, 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 suggest? 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}" } } ----- Deniz AYDIN Senior Network Engineer -- View this message in context: http://freeradius.1045715.n5.nabble.com/Parsing-the-multiple-attributes-with... Sent from the FreeRadius - User mailing list archive at Nabble.com.
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 suggest?
Yes, using the foreach construct in version 3 :) -Arran Arran Cudbard-Bell a.cudbardb@freeradius.org Betelwiki, Betelwiki, Betelwiki.... http://wiki.freeradius.org/ !
participants (2)
-
Arran Cudbard-Bell -
denizaydin