Forum Discussion
Russell_77729
Nimbostratus
Dec 03, 2012basic iRule syntax
I have the following iRule. I want to also check for "[UDP::local_port] == 80". I would rather not nest my if statements. How can I evaluate clianet_addr and local_port in the same expression?
i.e. if { [class match [IP::client_addr] equals proxy_free] && [[UDP::local_port] == 80] }
when CLIENT_ACCEPTED {
if { [class match [IP::client_addr] equals proxy_free] } {
snat automap
} else {
snat none
}
}
1 Reply
- hoolio
Cirrostratus
Hi Russell,
You can try this:when CLIENT_ACCEPTED { if { [class match [IP::client_addr] equals proxy_free] and [UDP::local_port] == 80} { snat automap } else { snat none } }
Aaron
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