aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJose Celestino <japc@co.sapo.pt>2025-01-14 13:52:46 +0000
committerJose Celestino <japc@co.sapo.pt>2025-01-14 13:52:46 +0000
commit39a49f95bc02842347eea6ce2168f91483011b9f (patch)
treee6a2e4b02ce7922cc6c6cb87f4c5b2fa1bb69252
parent03d4df207410e21f3eff0af45b353ee0e5d8572e (diff)
downloadrspamd-39a49f95bc02842347eea6ce2168f91483011b9f.tar.gz
rspamd-39a49f95bc02842347eea6ce2168f91483011b9f.zip
[Minor] Don't skip resolve_ip when ignore_defaults is true and ipv4 and ipv6 aren't set
-rw-r--r--src/plugins/lua/rbl.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/lua/rbl.lua b/src/plugins/lua/rbl.lua
index 232682110..2c2fe0071 100644
--- a/src/plugins/lua/rbl.lua
+++ b/src/plugins/lua/rbl.lua
@@ -983,7 +983,7 @@ local function gen_rbl_callback(rule)
if req.resolve_ip then
-- Deal with both ipv4 and ipv6
-- Resolve names first
- if rule.ipv4 and r:resolve_a({
+ if (rule.ipv4 == nil or rule.ipv4) and r:resolve_a({
task = task,
name = req.n,
callback = gen_rbl_ip_dns_callback(req),
@@ -991,7 +991,7 @@ local function gen_rbl_callback(rule)
}) then
nresolved = nresolved + 1
end
- if rule.ipv6 and r:resolve('aaaa', {
+ if (rule.ipv6 == nil or rule.ipv6) and r:resolve('aaaa', {
task = task,
name = req.n,
callback = gen_rbl_ip_dns_callback(req),