Forum Discussion
Paul_Slosberg_8
May 17, 2007Historic F5 Account
A better way
Greetings,
Im trying to grab the last octect of the client adress so I can then use that to send the thraffic to the proper pool. I will have 254 pools that I need to send traffic too. Im trying t...
JRahm
Admin
May 17, 2007regex is expensive. Try this:
when CLIENT_ACCEPTED {
set port_info [getfield [IP::client_addr] "." 4]
if { [string length $port_info] equals "1" } {
pool mypool_400$port_info
} elseif { [string length $port_info] equals "2" } {
pool mypool_40$port_info
} elseif { [string length $port_info] equals "3" } {
pool mypool_4$port_info
} else { pool myDefault }
}Untested, but passes syntax checker
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
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