]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] Don't skip resolve_ip when ignore_defaults is true and ipv4 and ipv6 aren... 5292/head
authorJose Celestino <japc@co.sapo.pt>
Tue, 14 Jan 2025 13:52:46 +0000 (13:52 +0000)
committerJose Celestino <japc@co.sapo.pt>
Tue, 14 Jan 2025 13:52:46 +0000 (13:52 +0000)
src/plugins/lua/rbl.lua

index 23268211026db70492e40783fae03410c0ac1a54..2c2fe0071eeeab7fede90342333bef7c7d59feed 100644 (file)
@@ -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),