Forum Discussion
Nicolas_Menant
Employee
Mar 31, 2008Session command and any virtual ...
Hi,
i faced an issue when trying to share session data between VS:
here was my code:
when HTTP_REQUEST {
if {[session lookup uie {[IP::client_addr] any virtual}] eq ""} {
log local0. "no session data found"
session add uie {[IP::client_addr] any virtual} "1" 1800
} else {
log local0. "session data found "
}
}
Then if i look at my persistence record i can see that my persistence value is [IP::client_addr] -_-'
I did several manipulation and saw that by doing it through a variable it would work and without the {}
when HTTP_REQUEST {
set line "[IP::client_addr] any virtual"
if {[session lookup uie $line] eq ""} {
log local0. "no session data found"
session add uie $line "1" 1800
} else {
log local0. "session data found "
}
}
Is it some kind of issue ?
Thanks for your help!
I saw this behavior in v9.4.3 and v9.4.4
- Nicolas_Menant
Employee
Out of curiosity i tried this iRule:when HTTP_REQUEST { set line "[IP::client_addr] any virtual" if {[persist lookup uie {[IP::client_addr] any virtual}] eq ""} { log local0. "no session data found" persist add uie {[IP::client_addr] any virtual} 1800 } else { log local0. "session data found " } }
- rubbishking_110
Nimbostratus
Hi - Nicolas_Menant
Employee
No mandatory since my workaround works but i think it may be better to wait for an answer from Devcentral. - rubbishking_110
Nimbostratus
thanks! - Nicolas_Menant
Employee
Hi, - Lee_Orrick_5554Historic F5 AccountThis also applies to the persist command.
- Nicolas_Menant
Employee
Yes it must definitely apply to the persist command too
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