Forum Discussion
smp_86112
Cirrostratus
Jun 23, 2010switch statement, [IP::addr], and varying subnet masks
I have an irule that uses a bunch of if statements that I'd like to consolidate into a single switch statement:
when HTTP_REQUEST {
if { [IP::addr [IP::client_addr]/26 equals xxx.xxx.xxx.xxx] ...
Ian_Smith
Jun 23, 2010Ret. Employee
the [IP::addr] command is what lets you match on CIDR network masks in the code snippet you provided, not the if conditional.
Unfortunately, that functionality isn't part of the switch matching engine - you can do classful networks with -glob matching (/8,/16, /24) but not CIDR networks (/21 /9 /30).
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
