diff options
author | Cy Schubert <cy@FreeBSD.org> | 2015-07-01 03:12:13 +0000 |
---|---|---|
committer | Cy Schubert <cy@FreeBSD.org> | 2015-07-01 03:12:13 +0000 |
commit | 873997f35a991eee09ed91148a0cf332360380da (patch) | |
tree | 5b1ffa3ad0e56e0e9f2991011729791ee86d7632 /lib/isc/unix/ifiter_getifaddrs.c | |
parent | 4ba32eb5a8bf3455c09d1513ed2af8d2c861a6ba (diff) |
Notes
Diffstat (limited to 'lib/isc/unix/ifiter_getifaddrs.c')
-rw-r--r-- | lib/isc/unix/ifiter_getifaddrs.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/isc/unix/ifiter_getifaddrs.c b/lib/isc/unix/ifiter_getifaddrs.c index 425b9b4c3d355..ad7c5f85c8ec9 100644 --- a/lib/isc/unix/ifiter_getifaddrs.c +++ b/lib/isc/unix/ifiter_getifaddrs.c @@ -147,6 +147,14 @@ internal_current(isc_interfaceiter_t *iter) { ifa = iter->pos; #ifdef __linux + /* + * [Bug 2792] + * burnicki: iter->pos is usually never NULL here (anymore?), + * so linux_if_inet6_current(iter) is never called here. + * However, that routine would check (under Linux), if the + * interface is in a tentative state, e.g. if there's no link + * yet but an IPv6 address has already be assigned. + */ if (iter->pos == NULL) return (linux_if_inet6_current(iter)); #endif @@ -154,6 +162,17 @@ internal_current(isc_interfaceiter_t *iter) { INSIST(ifa != NULL); INSIST(ifa->ifa_name != NULL); + +#ifdef IFF_RUNNING + /* + * [Bug 2792] + * burnicki: if the interface is not running then + * it may be in a tentative state. See above. + */ + if ((ifa->ifa_flags & IFF_RUNNING) == 0) + return (ISC_R_IGNORE); +#endif + if (ifa->ifa_addr == NULL) return (ISC_R_IGNORE); |