]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
1976. [bug] Handle systems with no IPv4 addresses. [RT #15695]
authorMark Andrews <marka@isc.org>
Thu, 2 Feb 2006 22:32:27 +0000 (22:32 +0000)
committerMark Andrews <marka@isc.org>
Thu, 2 Feb 2006 22:32:27 +0000 (22:32 +0000)
CHANGES
lib/isc/unix/ifiter_ioctl.c

diff --git a/CHANGES b/CHANGES
index 6be6cbca81dfb0c23a8d8a18bb57b8fcc5f05082..61b8f3680eff0e44b231d65e32b190540bdfcef0 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,5 @@
+1976.  [bug]           Handle systems with no IPv4 addresses. [RT #15695]
+
 1975.  [bug]           libbind: isc_gethexstring() could misparse multi-line
                        hex strings with comments. [RT #15814]
 
index b296a44e484947e0077a464ed156d7a677504099..1e34c5f8d63f1efe8986cb5302ad0d0088c5a45f 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: ifiter_ioctl.c,v 1.53 2005/10/14 01:14:10 marka Exp $ */
+/* $Id: ifiter_ioctl.c,v 1.54 2006/02/02 22:32:27 marka Exp $ */
 
 /*! \file
  * \brief
@@ -530,7 +530,8 @@ internal_current4(isc_interfaceiter_t *iter) {
 #endif
 
        REQUIRE(VALID_IFITER(iter));
-       REQUIRE (iter->pos < (unsigned int) iter->ifc.ifc_len);
+       REQUIRE(iter->ifc.ifc_len == 0 ||
+               iter->pos < (unsigned int) iter->ifc.ifc_len);
 
 #ifdef __linux
        result = linux_if_inet6_current(iter);
@@ -539,6 +540,9 @@ internal_current4(isc_interfaceiter_t *iter) {
        iter->first = ISC_TRUE;
 #endif
 
+       if (iter->ifc.ifc_len == 0)
+               return (ISC_R_NOMORE);
+
        ifrp = (struct ifreq *)((char *) iter->ifc.ifc_req + iter->pos);
 
        memset(&ifreq, 0, sizeof(ifreq));