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

1454. [port] Use getifaddrs() if available for interface scanning.

--disable-getifaddrs to override.  Glibc currently
                        has a getifaddrs() that does not support IPv6.
                        Use --enable-getifaddrs=glibc to force the use of
                        this version under linux machines.
This commit is contained in:
Mark Andrews
2003-04-01 05:18:22 +00:00
parent e9f2290397
commit 8ca42f6318
6 changed files with 234 additions and 6 deletions

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: interfaceiter.c,v 1.32 2003/03/03 01:42:59 marka Exp $ */
/* $Id: interfaceiter.c,v 1.33 2003/04/01 05:18:22 marka Exp $ */
#include <config.h>
@@ -118,7 +118,9 @@ get_addr(unsigned int family, isc_netaddr_t *dst, struct sockaddr *src) {
* Include system-dependent code.
*/
#if HAVE_IFLIST_SYSCTL
#if HAVE_GETIFADDRS
#include "ifiter_getifaddrs.c"
#elif HAVE_IFLIST_SYSCTL
#include "ifiter_sysctl.c"
#else
#include "ifiter_ioctl.c"
@@ -184,7 +186,8 @@ isc_interfaceiter_destroy(isc_interfaceiter_t **iterp)
REQUIRE(VALID_IFITER(iter));
internal_destroy(iter);
isc_mem_put(iter->mctx, iter->buf, iter->bufsize);
if (iter->buf != NULL)
isc_mem_put(iter->mctx, iter->buf, iter->bufsize);
iter->magic = 0;
isc_mem_put(iter->mctx, iter, sizeof(*iter));