]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
pullup:
authorMark Andrews <marka@isc.org>
Wed, 12 Dec 2001 00:16:47 +0000 (00:16 +0000)
committerMark Andrews <marka@isc.org>
Wed, 12 Dec 2001 00:16:47 +0000 (00:16 +0000)
1154.  [bug]           Don't attempt to obtain the netmask of a interface
                       if there is no address configured.  [RT #2176]

CHANGES
lib/isc/unix/ifiter_ioctl.c

diff --git a/CHANGES b/CHANGES
index ab736b32a932613f2848e215e5738357747f363a..f8de60ed5dea97125de0b7a9227f82c6eeebc8a1 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,9 @@
                        succeeded on certain patched versions of
                        AIX 4.3.3. [RT #2190]
 
+1154.  [bug]           Don't attempt to obtain the netmask of a interface
+                       if there is no address configured.  [RT #2176]
+
 1144.  [bug]           rndc-confgen would crash if both the -a and -t
                        options were specified. [RT #2159]
 
index 2c8fddfb5df9006027b3099a6e52d75b136b34ef..062a7c0c231c5fcc9fd70b796f57bb61d4aff8d6 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: ifiter_ioctl.c,v 1.19.2.1 2001/10/22 23:28:19 gson Exp $ */
+/* $Id: ifiter_ioctl.c,v 1.19.2.2 2001/12/12 00:16:47 marka Exp $ */
 
 /*
  * Obtain the list of network interfaces using the SIOCGLIFCONF ioctl.
@@ -236,6 +236,21 @@ internal_current(isc_interfaceiter_t *iter) {
        get_addr(family, &iter->current.address,
                 (struct sockaddr *)&lifreq.lifr_addr);
 
+       /*
+        * If the interface does not have a address ignore it.
+        */
+       switch (family) {
+       case AF_INET:
+               if (iter->current.address.type.in.s_addr == htonl(INADDR_ANY))
+                       return (ISC_R_IGNORE);
+               break;
+       case AF_INET6:
+               if (memcmp(&iter->current.address.type.in6, &in6addr_any,
+                          sizeof(in6addr_any)) == 0)
+                       return (ISC_R_IGNORE);
+               break;
+       }
+
        /*
         * Get interface flags.
         */