Change fastL4 profile in iRule
Hi,
Is it possible to change which fastL4 profile you are using from within an iRule?
My situation is that I need to have an indefinite idle timeout on connections from certain ip addresses, ideally I would modify IP::idle_timeout in the iRule; but there is no valid IP::idle_timeout that will set indefinite. To check if it was possible to set indefinite from within an iRule I changed the fastL4 profile to have indefinite idle timeout then logged the value of IP::idle_timeout
when CLIENT_ACCEPTED {
if { [IP::addr [IP::client_addr] equals 10.1.1.1] } {
log local0. "original timeout: [IP::idle_timeout]"
}
}
This resulted in log lines
CLIENT_ACCEPTED: original timeout: -1
I tried to set this value from within my iRule
<pre class="prettyprint lang-tcl">`when CLIENT_ACCEPTED {
if { [IP::addr [IP::client_addr] equals 10.1.1.1] } {
log local0. "original timeout: [IP::idle_timeout]"
IP::idle_timeout -1
log local0. "modified timeout: [IP::idle_timeout]"
}
}
However this produced the following output
- invalid timeout value (line 1) invoked from within "IP::idle_timeout -1"
So my next thought was to create multiple fastL4 profiles and one of them can have indefinite timeouts, then I can switch to this profile from within my iRule for the connections that I need an indefinite timeout on. Problem being I cannot see a way to change profile from within an iRule.
Any ideas?