aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2022-08-11 21:36:13 +0100
committerVsevolod Stakhov <vsevolod@rspamd.com>2022-08-11 21:36:13 +0100
commita28a06159b49af6dc90d97d0b3bbf82581081282 (patch)
tree61d10ff0944530d4b9b53e82c6d21f6da33b99f5
parentc0d1670b526c6c2bf739661af4f06852b5eb9e04 (diff)
downloadrspamd-a28a06159b49af6dc90d97d0b3bbf82581081282.tar.gz
rspamd-a28a06159b49af6dc90d97d0b3bbf82581081282.zip
[Minor] Ignore irrelevant DNS replies
-rw-r--r--src/lua/lua_dns_resolver.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lua/lua_dns_resolver.c b/src/lua/lua_dns_resolver.c
index 8827cb1c1..cbdb06641 100644
--- a/src/lua/lua_dns_resolver.c
+++ b/src/lua/lua_dns_resolver.c
@@ -237,6 +237,11 @@ lua_push_dns_reply (lua_State *L, const struct rdns_reply *reply)
LL_FOREACH (reply->entries, elt)
{
+ if (!rdns_request_has_type(reply->request, elt->type)) {
+ /* Unrequested type has been returned, ignore it */
+ continue;
+ }
+
switch (elt->type) {
case RDNS_REQUEST_A:
addr = rspamd_inet_address_new (AF_INET, &elt->content.a.addr);