summaryrefslogtreecommitdiffstats
path: root/src/lua
diff options
context:
space:
mode:
Diffstat (limited to 'src/lua')
-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);