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] ...
hoolio
Cirrostratus
Jun 23, 2010Could you rework the comparison logically to check if the client IP is part of the subnets (ie [IP::addr [IP::client_addr] equals xxx.xxx.xxx.xxx/26] instead of [IP::addr [IP::client_addr]/26 equals xxx.xxx.xxx.xxx]? If so, you could do an address comparison using class match (or matchclass) and an address type datagroup of the subnets.
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
