]> source.dussan.org Git - rspamd.git/commitdiff
[Project] Rdns: Unregister TCP requests
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 5 Jan 2022 08:59:43 +0000 (08:59 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 5 Jan 2022 08:59:43 +0000 (08:59 +0000)
contrib/librdns/dns_private.h
contrib/librdns/util.c

index a5eebfd97b9b9de7dd3a35141bfbc3d67057b2f3..19e8c0718e0646bed46920493b6117d2252ffbcc 100644 (file)
@@ -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
 
index b7cd99a67aa3feaceb3cb1560319af56ce0d72bb..9ced3ebd4828b18bdd23f4f117cf61e004551297 100644 (file)
@@ -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 (