smp_86112
Feb 18, 2015Cirrostratus
Check to see if [RADIUS::avp 31 string] exists
Hi. I found out about some unexpected behavior today as a result of this iRule:
when CLIENT_ACCEPTED {
persist uie "[RADIUS::avp 31 string]" 900
}
The problem I found is that the LTM sends an ICMP - Port Unreachable response when the RADIUS request doesn't contain the [RADIUS::avp 31] attribute. I need to edit this iRule in a way that checks to see if that AVP exists first. Seems simple enough, but using a simple "exists" doesn't seem to work. What's a good way to check for the existence of this parameter before attempting to use it for persistence?
Thanks.
Does [RADIUS::avp 31] possibly return as an empty string, "", if it returns nothing? I would add a log local0. "radius 31 is [RADIUS::avp 31]." And test the scenario to see if returns an empty string. If it is, your if can be
If { not ([RADIUS::avp 31 string] equals "") } { persist uie "[RADIUS::avp 31 string]" 900 } }