Hi,
I’ve been looking into the predefined RADIUS::avp command, documented here: DevCentral - An F5 Technical Community
Of particular interest is this option:
RADIUS::avp attr [attr_type] [index x] [vendor-id y] [vendor-type z]¶RADIUS Vendor-Specific attributeOptional attr_type = ( octet | ip4 | ip6 | integer )See example belowIntroduced in Version 11.4.0
In my situation, I have a RADIUS flow that has multiple VSAs, with the same vendor-id and vendor-type, e.g.
VSA 1 Type: AVP 26, Vendor-Id 9, Vendor-Type 1 Value: attribute1=string1
VSA 2 Type: AVP 26, Vendor-Id 9, Vendor-Type 1 Value: attribute2=string2
I would like to use UIE persistence based upon a desired value, for example attribute2.
The tricky bit for me is pulling the value out.
If I modify the index, I can see the value I want, e.g.
[RADIUS::avp 26 “string” index 0 vendor-id 9 vendor-type 1] returns attribute1=string1
[RADIUS::avp 26 “string” index 1 vendor-id 9 vendor-type 1] returns attribute2=string2
The problem is the index values will change, as the number of VSAs in a stream is variable. In some flows, attribute2 may be in index 1, in other flows it may be in index 8.
I’m wondering if anyone could offer advice in regards to an efficient way to extract this.
I’m not opposed to something like a for loop, however I’m not sure of the best way to do this since the index length is variable.
Thanks.