performance - cache empty rdns results

This commit is contained in:
florian 2023-05-14 10:12:33 +02:00
parent e36c743c70
commit a686562f18
No known key found for this signature in database
GPG Key ID: 3D80806F12602A7C
1 changed files with 3 additions and 2 deletions

View File

@ -352,8 +352,9 @@ utils.get_rdns = function(ip)
if not answers then
return false, err
end
local ret_err = "success"
if answers.errcode then
return {}, answers.errstr
ret_err = answers.errstr
end
-- Extract all PTR
local ptrs = {}
@ -367,7 +368,7 @@ utils.get_rdns = function(ip)
if not ok then
logger:log(ngx.ERR, "can't set rdns into cachestore : " .. err)
end
return ptrs, "success"
return ptrs, ret_err
end
utils.get_ips = function(fqdn, ipv6)