]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
1673. [port] linux: issue a error messages if IPv6 interface
authorMark Andrews <marka@isc.org>
Tue, 22 Jun 2004 02:10:48 +0000 (02:10 +0000)
committerMark Andrews <marka@isc.org>
Tue, 22 Jun 2004 02:10:48 +0000 (02:10 +0000)
                        scans fails.

CHANGES
lib/isc/unix/ifiter_ioctl.c

diff --git a/CHANGES b/CHANGES
index 5ae19e98cb50cf07b79783bbc1864e8ba02e14bf..3ece5b58d13526fcfa58490aa7edd61f922f657b 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+1673.  [port]          linux: issue a error messages if IPv6 interface
+                       scans fails.
+
 1672.  [cleanup]       Tests which only function in a threaded build
                        now return R:THREADONLY (rather than R:UNTESTED)
                        in a non-threaded build.
index 837cda19bb358fb7fdc7d6ef28706c3529216c4e..a1fabf95f884ee861af374f999a74fd017a2d506 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: ifiter_ioctl.c,v 1.19.2.5.2.12 2004/06/19 01:03:38 marka Exp $ */
+/* $Id: ifiter_ioctl.c,v 1.19.2.5.2.13 2004/06/22 02:10:48 marka Exp $ */
 
 /*
  * Obtain the list of network interfaces using the SIOCGLIFCONF ioctl.
@@ -454,15 +454,28 @@ linux_if_inet6_current(isc_interfaceiter_t *iter) {
 
        if (iter->valid != ISC_R_SUCCESS)
                return (iter->valid);
-       if (iter->proc == NULL)
+       if (iter->proc == NULL) {
+               isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
+                             ISC_LOGMODULE_INTERFACE, ISC_LOG_ERROR,
+                             "/proc/net/if_inet6:iter->proc == NULL");
                return (ISC_R_FAILURE);
+       }
 
        res = sscanf(iter->entry, "%32[a-f0-9] %x %x %x %x %16s\n",
                     address, &ifindex, &prefix, &flag3, &flag4, name);
-       if (res != 6)
+       if (res != 6) {
+               isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
+                             ISC_LOGMODULE_INTERFACE, ISC_LOG_ERROR,
+                             "/proc/net/if_inet6:sscanf() -> %d (expected 6)",
+                             res);
                return (ISC_R_FAILURE);
-       if (strlen(address) != 32)
+       }
+       if (strlen(address) != 32) {
+               isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
+                             ISC_LOGMODULE_INTERFACE, ISC_LOG_ERROR,
+                             "/proc/net/if_inet6:strlen(%s) != 32", address);
                return (ISC_R_FAILURE);
+       }
        for (i = 0; i < 16; i++) {
                unsigned char byte;
                static const char hex[] = "0123456789abcdef";