From: Vsevolod Stakhov Date: Wed, 5 Jan 2022 08:59:43 +0000 (+0000) Subject: [Project] Rdns: Unregister TCP requests X-Git-Tag: 3.2~129^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=31282224e9e6c98c7052259c77bd3f466ed50028;p=thirdparty%2Frspamd.git [Project] Rdns: Unregister TCP requests --- diff --git a/contrib/librdns/dns_private.h b/contrib/librdns/dns_private.h index a5eebfd97b..19e8c0718e 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 b7cd99a67a..9ced3ebd48 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 (