commit 3128222: [Project] Rdns: Unregister TCP requests

Vsevolod Stakhov vsevolod at highsecure.ru
Wed Jan 5 11:28:18 UTC 2022


Author: Vsevolod Stakhov
Date: 2022-01-05 08:59:43 +0000
URL: https://github.com/rspamd/rspamd/commit/31282224e9e6c98c7052259c77bd3f466ed50028

[Project] Rdns: Unregister TCP requests

---
 contrib/librdns/dns_private.h | 2 +-
 contrib/librdns/util.c        | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/contrib/librdns/dns_private.h b/contrib/librdns/dns_private.h
index a5eebfd97..19e8c0718 100644
--- a/contrib/librdns/dns_private.h
+++ b/contrib/librdns/dns_private.h
@@ -36,7 +36,7 @@ static const int dns_port = 53;
 static const int default_io_cnt = 8;
 static const int default_tcp_io_cnt = 1;
 
-#define UDP_PACKET_SIZE (4096 * 2)
+#define UDP_PACKET_SIZE (512)
 
 #define DNS_COMPRESSION_BITS 0xC0
 
diff --git a/contrib/librdns/util.c b/contrib/librdns/util.c
index b7cd99a67..9ced3ebd4 100644
--- a/contrib/librdns/util.c
+++ b/contrib/librdns/util.c
@@ -506,6 +506,9 @@ rdns_request_free (struct rdns_request *req)
 				req->async_event = NULL;
 			}
 		}
+		if (req->state == RDNS_REQUEST_TCP) {
+			rdns_request_remove_from_hash(req);
+		}
 #ifdef TWEETNACL
 		if (req->curve_plugin_data != NULL) {
 			req->resolver->curve_plugin->cb.curve_plugin.finish_cb (


More information about the Commits mailing list