Forum Discussion
bilsch_10068
Oct 26, 2010Nimbostratus
Fix to http persistence cookie logger irule
Was working with the persistence cookie logger irule, its logging the wrong value for ports.
http://devcentral.f5.com/wiki/default.aspx/iRules/Persistence_Cookie_Logger.html
Origin...
hooleylist
Nov 03, 2010Cirrostratus
Hi Bilsch,
Thanks for finding, fixing and pointing this out. Your interpretation looks correct to me:
when RULE_INIT {
From http://support.f5.com/kb/en-us/solutions/public/6000/900/sol6917.html
For example, if the port of the destination server is 8080, the BIG-IP LTM encodes the port as follows:
8080 = 0x1F90
Reverse byte order = 0x901F
0x901F = 36895
set myPortE 36895
set myPortH [format %x $myPortE]
log local0. "\$myPortE: $myPortE, \$myPortH, $myPortH"
Old, wrong way
log local0. "Old: [expr 0x[substr $myPortH 2 2]][expr 0x[substr $myPortH 0 2]]"
Updated, correct way
log local0. "New: [expr 0x[substr $myPortH 2 2][substr $myPortH 0 2]]"
Log output:
: $myPortE: 36895, $myPortH, 901f
: Old: 31144
: New: 8080
}
Aaron
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