mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-28 21:17:54 +00:00
start at port 5353, and try up to port 5399. This is so both Andreas and I
can run things on the same machine. :)
This commit is contained in:
parent
006652999a
commit
3a19eddcc7
@ -2324,6 +2324,7 @@ dns_resolver_create(dns_view_t *view,
|
|||||||
dns_resolver_t *res;
|
dns_resolver_t *res;
|
||||||
isc_result_t result = ISC_R_SUCCESS;
|
isc_result_t result = ISC_R_SUCCESS;
|
||||||
unsigned int i, buckets_created = 0;
|
unsigned int i, buckets_created = 0;
|
||||||
|
in_port_t port = 5353;
|
||||||
|
|
||||||
REQUIRE(resp != NULL && *resp == NULL);
|
REQUIRE(resp != NULL && *resp == NULL);
|
||||||
REQUIRE(ntasks > 0);
|
REQUIRE(ntasks > 0);
|
||||||
@ -2381,15 +2382,18 @@ dns_resolver_create(dns_view_t *view,
|
|||||||
&res->udpsocket4);
|
&res->udpsocket4);
|
||||||
if (result != ISC_R_SUCCESS)
|
if (result != ISC_R_SUCCESS)
|
||||||
goto cleanup_buckets;
|
goto cleanup_buckets;
|
||||||
/*
|
result = ISC_R_UNEXPECTED;
|
||||||
* XXXRTH Temporarily bind() to 5353 to make things
|
while (result != ISC_R_SUCCESS && port < 5400) {
|
||||||
* easier for Bob's firewalls.
|
ina.s_addr = htonl(INADDR_ANY);
|
||||||
*/
|
isc_sockaddr_fromin(&sa, &ina, port);
|
||||||
ina.s_addr = htonl(INADDR_ANY);
|
result = isc_socket_bind(res->udpsocket4, &sa);
|
||||||
isc_sockaddr_fromin(&sa, &ina, 5353);
|
if (result != ISC_R_SUCCESS)
|
||||||
result = isc_socket_bind(res->udpsocket4, &sa);
|
port++;
|
||||||
if (result != ISC_R_SUCCESS)
|
}
|
||||||
|
if (result != ISC_R_SUCCESS) {
|
||||||
|
RTRACE("Could not open UDP port");
|
||||||
goto cleanup_buckets;
|
goto cleanup_buckets;
|
||||||
|
}
|
||||||
result = dns_dispatch_create(res->mctx, res->udpsocket4,
|
result = dns_dispatch_create(res->mctx, res->udpsocket4,
|
||||||
res->buckets[0].task, 4096,
|
res->buckets[0].task, 4096,
|
||||||
50, 50, 14, &res->dispatch4);
|
50, 50, 14, &res->dispatch4);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user