diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2022-08-11 21:36:13 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2022-08-11 21:36:13 +0100 |
commit | a28a06159b49af6dc90d97d0b3bbf82581081282 (patch) | |
tree | 61d10ff0944530d4b9b53e82c6d21f6da33b99f5 | |
parent | c0d1670b526c6c2bf739661af4f06852b5eb9e04 (diff) | |
download | rspamd-a28a06159b49af6dc90d97d0b3bbf82581081282.tar.gz rspamd-a28a06159b49af6dc90d97d0b3bbf82581081282.zip |
[Minor] Ignore irrelevant DNS replies
-rw-r--r-- | src/lua/lua_dns_resolver.c | 5 |
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); |