Hi Zuke,
the
if
command has a build inmplicit expression. No need for the explicit
[expr]
command.
when CLIENT_ACCEPTED {
if { ( [TCP::client_port] < 30000 ) or ( [TCP::client_port] > 32768 ) } then {
reject
}
}
Just for learning purposes the iRules below will work too. But they are more complex and also slower, since you basically pipe the output of the explicit
[expr]
command (0 or 1) to the implicit expression of the
if
command...
when CLIENT_ACCEPTED {
if { [expr { [TCP::client_port] < 30000 }] or [expr { [TCP::client_port] > 32768 }]} then {
reject
}
}
when CLIENT_ACCEPTED {
if { [expr { ( [TCP::client_port] < 30000 ) or ( [TCP::client_port] > 32768 ) }] } then {
reject
}
}
Cheers, Kai