]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
2225. [bug] More support for systems with no IPv4 addresses.
authorMark Andrews <marka@isc.org>
Thu, 30 Aug 2007 06:02:28 +0000 (06:02 +0000)
committerMark Andrews <marka@isc.org>
Thu, 30 Aug 2007 06:02:28 +0000 (06:02 +0000)
                        [RT #17111]

CHANGES
lib/isc/unix/ifiter_ioctl.c

diff --git a/CHANGES b/CHANGES
index 18afd05be2fb69c3876e8cf3bb72a8276c33ef9c..1421d897b7a2950e1dda2a88c921c5d273fce752 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+2225.  [bug]           More support for systems with no IPv4 addresses.
+                       [RT #17111]
+
 2224.  [bug]           Defer journal compaction if a xfrin is in progress.
                        [RT #17119]
 
index 596a7b5d6196f7758ad070366bf88657b0adf65f..46949e8f3c6fbb0cc9508db3b5892c21bc67c3ae 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: ifiter_ioctl.c,v 1.57 2007/06/19 23:47:18 tbox Exp $ */
+/* $Id: ifiter_ioctl.c,v 1.58 2007/08/30 06:02:28 marka Exp $ */
 
 /*! \file
  * \brief
@@ -905,7 +905,8 @@ internal_next4(isc_interfaceiter_t *iter) {
        struct ifreq *ifrp;
 #endif
 
-       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
        if (linux_if_inet6_next(iter) == ISC_R_SUCCESS)
@@ -913,6 +914,10 @@ internal_next4(isc_interfaceiter_t *iter) {
        if (!iter->first)
                return (ISC_R_SUCCESS);
 #endif
+
+       if (iter->ifc.ifc_len == 0)
+               return (ISC_R_NOMORE);
+
 #ifdef ISC_PLATFORM_HAVESALEN
        ifrp = (struct ifreq *)((char *) iter->ifc.ifc_req + iter->pos);