From 2f0bdbae4a1200dfc548d33a67d3973651b00238 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Thu, 16 Oct 2003 05:56:25 +0000 Subject: [PATCH] only look for IFF_POINTOPOINT if it is defined. --- lib/isc/unix/ifiter_ioctl.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/isc/unix/ifiter_ioctl.c b/lib/isc/unix/ifiter_ioctl.c index b4970759f2..216e6af9bb 100644 --- a/lib/isc/unix/ifiter_ioctl.c +++ b/lib/isc/unix/ifiter_ioctl.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: ifiter_ioctl.c,v 1.41 2003/10/07 03:34:30 marka Exp $ */ +/* $Id: ifiter_ioctl.c,v 1.42 2003/10/16 05:56:25 marka Exp $ */ /* * Obtain the list of network interfaces using the SIOCGLIFCONF ioctl. @@ -575,7 +575,7 @@ internal_current4(isc_interfaceiter_t *iter) { if ((ifreq.ifr_flags & IFF_UP) != 0) iter->current.flags |= INTERFACE_F_UP; -#ifdef IFF_POINTTOPOINT +#ifdef IFF_POINTOPOINT if ((ifreq.ifr_flags & IFF_POINTOPOINT) != 0) iter->current.flags |= INTERFACE_F_POINTTOPOINT; #endif @@ -632,7 +632,7 @@ internal_current4(isc_interfaceiter_t *iter) { inet: if (family != AF_INET) return (ISC_R_IGNORE); -#ifdef IFF_POINTTOPOINT +#ifdef IFF_POINTOPOINT /* * If the interface is point-to-point, get the destination address. */ @@ -669,8 +669,7 @@ internal_current4(isc_interfaceiter_t *iter) { * conversion. It comes from its own macro definition, * and is really hard to shut up. */ - if (ioctl(iter->socket, SIOCGIFNETMASK, (char *)&ifreq) - < 0) { + if (ioctl(iter->socket, SIOCGIFNETMASK, (char *)&ifreq) < 0) { isc__strerror(errno, strbuf, sizeof(strbuf)); UNEXPECTED_ERROR(__FILE__, __LINE__, isc_msgcat_get(isc_msgcat, @@ -764,12 +763,15 @@ internal_current6(isc_interfaceiter_t *iter) { if ((lifreq.lifr_flags & IFF_UP) != 0) iter->current.flags |= INTERFACE_F_UP; +#ifdef IFF_POINTOPOINT if ((lifreq.lifr_flags & IFF_POINTOPOINT) != 0) iter->current.flags |= INTERFACE_F_POINTTOPOINT; +#endif if ((lifreq.lifr_flags & IFF_LOOPBACK) != 0) iter->current.flags |= INTERFACE_F_LOOPBACK; +#ifdef IFF_POINTOPOINT /* * If the interface is point-to-point, get the destination address. */ @@ -795,6 +797,7 @@ internal_current6(isc_interfaceiter_t *iter) { (struct sockaddr *)&lifreq.lifr_dstaddr, lifreq.lifr_name); } +#endif /* * Get the network mask. Netmask already zeroed.