Forum Discussion
Leslie_South_55
Nimbostratus
Jan 31, 2008Multiple matchclass + "if" AND "if not"
I am trying to use both an 'if' and an 'if not' statement where both statements are looking at 2 different external class files. Here is the rule:
when HTTP_REQUEST {
log local0 "requeste...
hoolio
Cirrostratus
Jan 31, 2008Can you try wrapping the conditional test you're not'ing in parens?
when HTTP_REQUEST {
log local0 "requested [HTTP::uri]"
if {not ([matchclass [string tolower [HTTP::uri]] contains $::uri_block])} {
if {[matchclass [IP::client_addr] equals $::allowed] } {
log local0. "Valid Packet: [IP::client_addr] - [HTTP::uri] forwarding traffic"
} else {
log local0. "Invalid Packet: [IP::client_addr] - [HTTP::uri] discarding"
discard
}
}
}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
