]> 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:25:32 +0000 (02:25 +0000)
committerMark Andrews <marka@isc.org>
Tue, 22 Jun 2004 02:25:32 +0000 (02:25 +0000)
                        scans fails.

CHANGES
lib/isc/unix/ifiter_ioctl.c

diff --git a/CHANGES b/CHANGES
index 81a1ea2c0e8545ab3925c2083ee4671fc5a79ac8..9450c56e54d6a4460a8ddc4b68ae6ff899cc8557 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 9e9447cba8e614e0cd72151fc38f09fc9e84f741..6dcde144fa0c3609c6fe66d9a1230c10185fc04b 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: ifiter_ioctl.c,v 1.47 2004/06/19 00:48:15 marka Exp $ */
+/* $Id: ifiter_ioctl.c,v 1.48 2004/06/22 02:25:32 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";