HTTP:lookup_tbl(t)
Use this hash value to lookup the stick table, and then persist the session.
Syntax
HTTP:lookup_tbl(t);
Arguments
| Name | Description |
|---|---|
|
t |
A table specifies the operation and hash value. |
Events
Applicable in PERSISTENCE.
Example
when PERSISTENCE{
cip = HTTP:client_addr()
hash_str_cip = sha512_hex(cip)
t={}
t["operation"] = "save_tbl"
t["hash_value"] = hash_str_cip
t["srv_name"] = "pool1-3"
ret = HTTP:persist(t)
if ret then
debug("hash save table success\n");
else
debug("save table failed\n");
end
t={}
t["hash_value"]=hash_str_cip
ret = HTTP:lookup_tbl(t)
if ret then
debug("hash LOOKUP success\n")
else
debug("hash lookup failed\n")
end
}
Output:
Return True: lookup success, False, lookup failed and use the org. LB method
Supported Version
FortiADC version 5.4.x and later.