From: Vsevolod Stakhov Date: Wed, 1 Dec 2021 19:10:29 +0000 (+0000) Subject: [Minor] Adopt Rspamd to flags in rdns reply X-Git-Tag: 3.2~208 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e0f1732a975260140c235223d126e3e8a849f1e7;p=rspamd.git [Minor] Adopt Rspamd to flags in rdns reply --- diff --git a/src/lua/lua_dns.c b/src/lua/lua_dns.c index 0fdbe3f70..fe9951e89 100644 --- a/src/lua/lua_dns.c +++ b/src/lua/lua_dns.c @@ -166,9 +166,12 @@ lua_dns_callback (struct rdns_reply *reply, void *arg) else { lua_push_dns_reply (L, reply); - lua_pushboolean (L, reply->authenticated); + lua_pushboolean (L, reply->flags & RDNS_AUTH); lua_setfield (L, -3, "authenticated"); + lua_pushboolean (L, reply->flags & RDNS_TRUNCATED); + lua_setfield (L, -3, "truncated"); + /* result 1 - not and error */ lua_pushboolean (L, true); /* push table into stack, result 2 - results itself */ diff --git a/src/lua/lua_dns_resolver.c b/src/lua/lua_dns_resolver.c index f43267dc6..b5ded396d 100644 --- a/src/lua/lua_dns_resolver.c +++ b/src/lua/lua_dns_resolver.c @@ -169,7 +169,7 @@ lua_dns_resolver_callback (struct rdns_reply *reply, gpointer arg) * 3 - entries | nil * 4 - error | nil * 5 - user_str - * 6 - reply->authenticated + * 6 - reply->flags & RDNS_AUTH * 7 - server */ if (reply->code != RDNS_RC_NOERROR) { @@ -183,7 +183,7 @@ lua_dns_resolver_callback (struct rdns_reply *reply, gpointer arg) lua_pushnil (L); } - lua_pushboolean (L, reply->authenticated); + lua_pushboolean (L, reply->flags & RDNS_AUTH); const gchar *servname = rdns_request_get_server (reply->request);