commit 49dd721: [Minor] Fix rdns requested_name field set-up

Vsevolod Stakhov vsevolod at highsecure.ru
Mon Jul 26 13:14:04 UTC 2021


Author: Vsevolod Stakhov
Date: 2021-07-26 14:08:33 +0100
URL: https://github.com/rspamd/rspamd/commit/49dd721646ed4a86d80a2b0073f22b7c0e51b109 (HEAD -> master)

[Minor] Fix rdns requested_name field set-up

---
 contrib/librdns/parse.c    | 2 +-
 contrib/librdns/resolver.c | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/contrib/librdns/parse.c b/contrib/librdns/parse.c
index fbf9d3e14..559d430a0 100644
--- a/contrib/librdns/parse.c
+++ b/contrib/librdns/parse.c
@@ -258,7 +258,7 @@ rdns_parse_rr (struct rdns_resolver *resolver,
 	bool parsed = false;
 
 	/* Skip the whole name */
-	if (! rdns_parse_labels (resolver, in, NULL, &p, rep, remain, false)) {
+	if (!rdns_parse_labels (resolver, in, NULL, &p, rep, remain, false)) {
 		rdns_info ("bad RR name");
 		return -1;
 	}
diff --git a/contrib/librdns/resolver.c b/contrib/librdns/resolver.c
index 3dd44012e..6036c74a8 100644
--- a/contrib/librdns/resolver.c
+++ b/contrib/librdns/resolver.c
@@ -150,6 +150,7 @@ rdns_make_reply (struct rdns_request *req, enum dns_rcode rcode)
 		rep->code = rcode;
 		req->reply = rep;
 		rep->authenticated = false;
+		rep->requested_name = req->requested_names[0].name;
 	}
 
 	return rep;


More information about the Commits mailing list