Forum Discussion
Ralf_Bruenig_74
Jun 02, 2008Historic F5 Account
workaround for 32 bit integer limitation
Hi all,
I need to extract the IP address out of the insert cookie. For this I found the following example on your page:
http://devcentral.f5.com/wiki/default.aspx/iRules/Persiste...
Ralf_Bruenig_74
Jun 03, 2008Historic F5 Account
Hi deb,
Thanks for your answer.
Actually it didn’t solve the problem since we have the issue already at the following line:
scan [HTTP::cookie $::myCookieName] "%d.%d.%d" myIpE myPortE unused
The problem is, that the string will be changed to integer with the %d statement. I did some further research and found that there is also a way to get the unsigned integer with the %u parameter. I really wonder why I haven’t seen that before.
With the following line it works fine:
scan [HTTP::cookie $::myCookieName] "%u.%d.%d" myIpE myPortE unused
It is actually not necessary to do the same thing with the ports since they anyway limited to 16 bits.
It would be great when somebody could fix this iRule in the iRules Samples list.
Cheers
Ralf
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