mirror of
https://github.com/isc-projects/bind9.git
synced 2026-03-18 08:32:17 -04:00
ignore non-IP4 interfaces in do_ip4() now that the interface
iterator can return such things
This commit is contained in:
parent
4702aa0b47
commit
fe609a031b
1 changed files with 8 additions and 5 deletions
|
|
@ -465,9 +465,11 @@ do_ipv4(ns_interfacemgr_t *mgr) {
|
|||
result = isc_interfaceiter_create(mgr->mctx, &iter);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return;
|
||||
|
||||
result = isc_interfaceiter_first(iter);
|
||||
while (result == ISC_R_SUCCESS) {
|
||||
|
||||
for (result = isc_interfaceiter_first(iter);
|
||||
result == ISC_R_SUCCESS;
|
||||
result = isc_interfaceiter_next(iter))
|
||||
{
|
||||
ns_interface_t *ifp;
|
||||
isc_interface_t interface;
|
||||
ns_listenelt_t *le;
|
||||
|
|
@ -477,11 +479,13 @@ do_ipv4(ns_interfacemgr_t *mgr) {
|
|||
* "listen-on" statements here. Also build list of
|
||||
* local addresses and local networks.
|
||||
*/
|
||||
|
||||
result = isc_interfaceiter_current(iter, &interface);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
break;
|
||||
|
||||
if (interface.address.family != AF_INET)
|
||||
continue;
|
||||
|
||||
for (le = ISC_LIST_HEAD(mgr->listenon->elts);
|
||||
le != NULL;
|
||||
le = ISC_LIST_NEXT(le, link))
|
||||
|
|
@ -542,7 +546,6 @@ do_ipv4(ns_interfacemgr_t *mgr) {
|
|||
}
|
||||
|
||||
}
|
||||
result = isc_interfaceiter_next(iter);
|
||||
}
|
||||
if (result != ISC_R_NOMORE)
|
||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
||||
|
|
|
|||
Loading…
Reference in a new issue