]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
pullup:
authorMark Andrews <marka@isc.org>
Sat, 13 Oct 2001 03:56:44 +0000 (03:56 +0000)
committerMark Andrews <marka@isc.org>
Sat, 13 Oct 2001 03:56:44 +0000 (03:56 +0000)
1051.   [bug]           Do not ignore a network interface completely just
                        because it has a noncontiguous netmask.  Instead,
                        omit it from the localnets ACL and issue a warning.
                        [RT #1891]

CHANGES
bin/named/interfacemgr.c

diff --git a/CHANGES b/CHANGES
index c6b5f9c5633c42685a6537831bf2611811d17475..ee12e812a139515903a7baea9b1a9cf79f054d97 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,9 +1,14 @@
-1048.  [bug]           Servers built with -DISC_MEM_USE_INTERNAL_MALLOC=1
+1051.  [bug]           Do not ignore a network interface completely just
+                       because it has a noncontiguous netmask.  Instead,
+                       omit it from the localnets ACL and issue a warning.
+                       [RT #1891]
+
 1050.  [bug]           Log messages reporting malformed IP addresses in
                        address lists such as that of the forwarders option
                        failed to include the correct error code, file
                        name, and line number. [RT #1890]
 
+1048.  [bug]           Servers built with -DISC_MEM_USE_INTERNAL_MALLOC=1
                        didn't work.
 
 1047.  [bug]           named was incorrectly refusing all requests signed
index 04f61423ed937c25fb58b3906a97b2361334c99e..7bf696bcc263d2b65b40e232c4bea6cd19f0ccd0 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: interfacemgr.c,v 1.59.2.1 2001/10/11 01:20:31 marka Exp $ */
+/* $Id: interfacemgr.c,v 1.59.2.2 2001/10/13 03:56:44 marka Exp $ */
 
 #include <config.h>
 
@@ -505,23 +505,32 @@ do_ipv4(ns_interfacemgr_t *mgr) {
                if ((interface.flags & INTERFACE_F_UP) == 0)
                        continue;
 
-               result = isc_netaddr_masktoprefixlen(&interface.netmask,
-                                                    &prefixlen);
-               if (result != ISC_R_SUCCESS)
-                       goto ignore_interface;
                elt.type = dns_aclelementtype_ipprefix;
                elt.negative = ISC_FALSE;
                elt.u.ip_prefix.address = interface.address;
-               elt.u.ip_prefix.prefixlen = prefixlen;
-               /* XXX suppress duplicates */
-               result = dns_acl_appendelement(mgr->aclenv.localnets, &elt);
-               if (result != ISC_R_SUCCESS)
-                       goto ignore_interface;
                elt.u.ip_prefix.prefixlen = 32;
                result = dns_acl_appendelement(mgr->aclenv.localhost, &elt);
                if (result != ISC_R_SUCCESS)
                        goto ignore_interface;
 
+               result = isc_netaddr_masktoprefixlen(&interface.netmask,
+                                                    &prefixlen);
+               if (result != ISC_R_SUCCESS) {
+                       isc_log_write(IFMGR_COMMON_LOGARGS,
+                                     ISC_LOG_WARNING,
+                                     "omitting IPv4 interface %s from "
+                                     "localnets ACL: %s",
+                                     interface.name,
+                                     isc_result_totext(result));
+               } else {
+                       elt.u.ip_prefix.prefixlen = prefixlen;
+                       /* XXX suppress duplicates */
+                       result = dns_acl_appendelement(mgr->aclenv.localnets,
+                                                      &elt);
+                       if (result != ISC_R_SUCCESS)
+                               goto ignore_interface;
+               }
+
                for (le = ISC_LIST_HEAD(mgr->listenon4->elts);
                     le != NULL;
                     le = ISC_LIST_NEXT(le, link))