mirror of
https://github.com/monero-project/monero.git
synced 2025-05-05 14:35:02 -04:00
update unbound from upstream
This commit is contained in:
parent
b0151de601
commit
1f49833d4f
155 changed files with 5482 additions and 3440 deletions
14
external/unbound/util/netevent.c
vendored
14
external/unbound/util/netevent.c
vendored
|
@ -43,8 +43,8 @@
|
|||
#include "util/log.h"
|
||||
#include "util/net_help.h"
|
||||
#include "util/fptr_wlist.h"
|
||||
#include "ldns/pkthdr.h"
|
||||
#include "ldns/sbuffer.h"
|
||||
#include "sldns/pkthdr.h"
|
||||
#include "sldns/sbuffer.h"
|
||||
#include "dnstap/dnstap.h"
|
||||
#ifdef HAVE_OPENSSL_SSL_H
|
||||
#include <openssl/ssl.h>
|
||||
|
@ -879,12 +879,12 @@ comm_point_tcp_accept_callback(int fd, short event, void* arg)
|
|||
}
|
||||
|
||||
/* grab the tcp handler buffers */
|
||||
c->cur_tcp_count++;
|
||||
c->tcp_free = c_hdl->tcp_free;
|
||||
if(!c->tcp_free) {
|
||||
/* stop accepting incoming queries for now. */
|
||||
comm_point_stop_listening(c);
|
||||
}
|
||||
/* addr is dropped. Not needed for tcp reply. */
|
||||
setup_tcp_handler(c_hdl, new_fd);
|
||||
}
|
||||
|
||||
|
@ -902,6 +902,7 @@ reclaim_tcp_handler(struct comm_point* c)
|
|||
}
|
||||
comm_point_close(c);
|
||||
if(c->tcp_parent) {
|
||||
c->tcp_parent->cur_tcp_count--;
|
||||
c->tcp_free = c->tcp_parent->tcp_free;
|
||||
c->tcp_parent->tcp_free = c;
|
||||
if(!c->tcp_free) {
|
||||
|
@ -1528,6 +1529,7 @@ comm_point_create_udp(struct comm_base *base, int fd, sldns_buffer* buffer,
|
|||
c->tcp_byte_count = 0;
|
||||
c->tcp_parent = NULL;
|
||||
c->max_tcp_count = 0;
|
||||
c->cur_tcp_count = 0;
|
||||
c->tcp_handlers = NULL;
|
||||
c->tcp_free = NULL;
|
||||
c->type = comm_udp;
|
||||
|
@ -1578,6 +1580,7 @@ comm_point_create_udp_ancil(struct comm_base *base, int fd,
|
|||
c->tcp_byte_count = 0;
|
||||
c->tcp_parent = NULL;
|
||||
c->max_tcp_count = 0;
|
||||
c->cur_tcp_count = 0;
|
||||
c->tcp_handlers = NULL;
|
||||
c->tcp_free = NULL;
|
||||
c->type = comm_udp;
|
||||
|
@ -1639,6 +1642,7 @@ comm_point_create_tcp_handler(struct comm_base *base,
|
|||
c->tcp_byte_count = 0;
|
||||
c->tcp_parent = parent;
|
||||
c->max_tcp_count = 0;
|
||||
c->cur_tcp_count = 0;
|
||||
c->tcp_handlers = NULL;
|
||||
c->tcp_free = NULL;
|
||||
c->type = comm_tcp;
|
||||
|
@ -1691,6 +1695,7 @@ comm_point_create_tcp(struct comm_base *base, int fd, int num, size_t bufsize,
|
|||
c->tcp_byte_count = 0;
|
||||
c->tcp_parent = NULL;
|
||||
c->max_tcp_count = num;
|
||||
c->cur_tcp_count = 0;
|
||||
c->tcp_handlers = (struct comm_point**)calloc((size_t)num,
|
||||
sizeof(struct comm_point*));
|
||||
if(!c->tcp_handlers) {
|
||||
|
@ -1758,6 +1763,7 @@ comm_point_create_tcp_out(struct comm_base *base, size_t bufsize,
|
|||
c->tcp_byte_count = 0;
|
||||
c->tcp_parent = NULL;
|
||||
c->max_tcp_count = 0;
|
||||
c->cur_tcp_count = 0;
|
||||
c->tcp_handlers = NULL;
|
||||
c->tcp_free = NULL;
|
||||
c->type = comm_tcp;
|
||||
|
@ -1810,6 +1816,7 @@ comm_point_create_local(struct comm_base *base, int fd, size_t bufsize,
|
|||
c->tcp_byte_count = 0;
|
||||
c->tcp_parent = NULL;
|
||||
c->max_tcp_count = 0;
|
||||
c->cur_tcp_count = 0;
|
||||
c->tcp_handlers = NULL;
|
||||
c->tcp_free = NULL;
|
||||
c->type = comm_local;
|
||||
|
@ -1857,6 +1864,7 @@ comm_point_create_raw(struct comm_base* base, int fd, int writing,
|
|||
c->tcp_byte_count = 0;
|
||||
c->tcp_parent = NULL;
|
||||
c->max_tcp_count = 0;
|
||||
c->cur_tcp_count = 0;
|
||||
c->tcp_handlers = NULL;
|
||||
c->tcp_free = NULL;
|
||||
c->type = comm_raw;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue