Forum Discussion
janholtz
Altostratus
Jul 20, 2010Simplist irule v9.x to v10.1
Hi all
I have an extremely simple irule that currently uses datagroups:
-------------------------------------------------------------------------------------------------
when CLIENT_ACCEPTED {
if { [matchclass [IP::client_addr] eq $::sourcegroup] && [matchclass [IP::local_addr] eq $::destinationgroup] } {
pool pool_exceptionpool
}
}
-------------------------------------------------------------------------------------------------
This is obviously not CMP friendly.
If I wish to make it CMP friendly on V10.1, would my replacement rule simply be:
-------------------------------------------------------------------------------------------------
when CLIENT_ACCEPTED {
if { [matchclass [IP::client_addr] eq $static::sourcegroup] && [matchclass [IP::local_addr] eq $static::destinationgroup] } {
pool pool_exceptionpool
}
}
The contents of the datagroups are static.
Best Regards
Jan
2 Replies
Sort By
- hoolio
Cirrostratus
Hi Jan,when CLIENT_ACCEPTED { if { [class match [IP::client_addr] eq sourcegroup] && [class match [IP::local_addr] eq destinationgroup] } { pool pool_exceptionpool } }
- hoolio
Cirrostratus
$static::variable_name should only be used as global variable replacements that aren't changed after RULE_INIT runs. Their value isn't synchronized across TMMs after RULE_INIT. An example case for using static:: variables is setting a debug value (set static::my_rule_debug 1) or other configuration options that apply for all connections and don't need to change over the course of connections.