Forum Discussion
teknet7_237497
Nimbostratus
Dec 12, 2015irule: if contains with variable
Hello Team,
I do have irule with the following lines:
binary scan [UDP::payload] @${tmpindex}H${hsize}cc attr_value3 attr_code3 attr_len3
if { $attr_value3 contains "audit-session-id" } { ...
Kai_Wilke
MVP
Dec 12, 2015Hi Teknet,
$attr_value3 is a string containing hexadecimal digits. So you'll never find the string "audit-session-id" in it.
But you may...
- Check if $attr_value3 contains "61756469745f73657373696f6e5f6964" (aka. hexadecimal representation of "audit_session_id")
- Check if [binary format H* $attr_value3] contains "audit_session_id"
- Change the binary scan format to "@${tmpindex}A${hsize}cc" and then check if $attr_value3 contains "audit_session_id"
Cheers, Kai
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
