I’m trying to write to the client SIP to the “unused” field in a persistence cookie I used the lines below to read info out of the cookie (from Dev Central)
scan [HTTP::cookie $current_cookie] {%[^\.].%d.%d} myIpE myPortE unused
log local0. "myIpD=$myIpE myPortE=$myPortE unused=$unused"
I tried the code below to write the client SIP but by all indications (looking inside the cookie) I have not broken the code..Any ideas would be welcome. The code I tried to write with is below. I commented a few of my attempts to get this working as they showed errors in the irule editor. I am able to encode the address…but I cant get it written to the cookie..
set addr "$clientip"
scan $addr "%u.%u.%u.%u" a b c d
log local0. "the Decimal Client IP and port is $addr"
set cookie_SIP "[expr ($d<<24)|($c<<16)|($b<<8)|$a]"
log local0. "the Hashed Value for the Client IP is $cookie_SIP" --
HTTP::cookie insert name "BIGipServerFP_pool" value $cookie path "/"
HTTP::cookie $current_cookie insert $client1p "/unused"