2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

Clean up the dns_dispatch_getudp API

Cleanup unused parts of dns_dispatch_getudp API, remove
dns_dispatch_getudp_dup() function and related code.
This commit is contained in:
Ondřej Surý
2021-05-12 23:27:15 +02:00
parent f487c6948b
commit 7cbfbc8faa
13 changed files with 34 additions and 228 deletions

View File

@@ -1260,7 +1260,7 @@ get_view_querysource_dispatch(const cfg_obj_t **maps, int af,
isc_result_t result = ISC_R_FAILURE;
dns_dispatch_t *disp;
isc_sockaddr_t sa;
unsigned int attrs, attrmask;
unsigned int attrs;
const cfg_obj_t *obj = NULL;
unsigned int maxdispatchbuffers = UDPBUFFERS;
isc_dscp_t dscp = -1;
@@ -1331,17 +1331,10 @@ get_view_querysource_dispatch(const cfg_obj_t **maps, int af,
}
}
attrmask = 0;
attrmask |= DNS_DISPATCHATTR_UDP;
attrmask |= DNS_DISPATCHATTR_TCP;
attrmask |= DNS_DISPATCHATTR_IPV4;
attrmask |= DNS_DISPATCHATTR_IPV6;
disp = NULL;
result = dns_dispatch_getudp(named_g_dispatchmgr, named_g_socketmgr,
named_g_taskmgr, &sa, 4096,
maxdispatchbuffers, 32768, 16411, 16433,
attrs, attrmask, &disp);
result = dns_dispatch_getudp(
named_g_dispatchmgr, named_g_socketmgr, named_g_taskmgr, &sa,
4096, maxdispatchbuffers, 32768, 16411, 16433, attrs, &disp);
if (result != ISC_R_SUCCESS) {
isc_sockaddr_t any;
char buf[ISC_SOCKADDR_FORMATSIZE];
@@ -10514,7 +10507,7 @@ named_add_reserved_dispatch(named_server_t *server,
in_port_t port;
char addrbuf[ISC_SOCKADDR_FORMATSIZE];
isc_result_t result;
unsigned int attrs, attrmask;
unsigned int attrs;
REQUIRE(NAMED_SERVER_VALID(server));
@@ -10554,16 +10547,11 @@ named_add_reserved_dispatch(named_server_t *server,
result = ISC_R_NOTIMPLEMENTED;
goto cleanup;
}
attrmask = 0;
attrmask |= DNS_DISPATCHATTR_UDP;
attrmask |= DNS_DISPATCHATTR_TCP;
attrmask |= DNS_DISPATCHATTR_IPV4;
attrmask |= DNS_DISPATCHATTR_IPV6;
result = dns_dispatch_getudp(named_g_dispatchmgr, named_g_socketmgr,
named_g_taskmgr, &dispatch->addr, 4096,
UDPBUFFERS, 32768, 16411, 16433, attrs,
attrmask, &dispatch->dispatch);
&dispatch->dispatch);
if (result != ISC_R_SUCCESS) {
goto cleanup;
}