Forum Discussion
Cindy_127211
Nimbostratus
May 18, 2006Rule is not validating
I keep getting the following error on a rule when I try to load it and I can't figure out why, as it looks similar to other rules that are validating.
BIGpipe: rule creation error:
01070151:3: Rule [SSLV2_Encrypt_Stmts] error:
line 7: [undefined procedure: else] [else {
HTTP::redirect "www.retireonline.com/rpsparticipant/invalid_ssl_version_2_request.jsp"
}]
Here is the rule:
rule SSLV2_Encrypt_Stmts {
when HTTP_REQUEST {
set mypool [findclass [virtual name] $::Pools " "]
HTTP::header insert "Custom" "stm:443"
if { ![matchclass [SSL::cipher version] equals $::CipherVersion] and [SSL::cipher bits] > 127 } {
pool $mypool
}
else {
HTTP::redirect "www.retireonline.com/rpsparticipant/invalid_ssl_version_2_request.jsp"
}
}
}
4 Replies
- Derek_Nelson_10
Nimbostratus
Sounds interesting, except that most of my if/then/else rules are in the format: - Al_Carandang_11
Nimbostratus
Very interesting indeed.. Makes me wonder what else F5 modified from standard TCL aside from their documented changes. It seems I've been discovering more and more lately. - Deb_Allen_18Historic F5 Accountas Al mentions, "else" is not a TCL command, rather is part of the "if" command, so v9 generates this tcl error if "else" begins a line:
- unRuleY_95363Historic F5 AccountYes, in a few cases we have made some changes to the Tcl parser. These consist of two general modifications and do not in any way change the behavior of "standard" Tcl.
merely because that's my own personal style. However, remember, the whole intent of this was all about making the non-Tcl, F5 user a little more comfortable with the switch to Tcl-based iRules.if {} { ... } else { ... }
This will also eventually get fixed in our version (CR44839).set myvar "bar" if { $myvar eq "foo" } { if { [string first -nocase $myvar "foo"] } { puts "yep" }
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