]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
Small fixes, makes unbound 0.0 work on SunOS4 sparc.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Fri, 16 Feb 2007 23:00:31 +0000 (23:00 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Fri, 16 Feb 2007 23:00:31 +0000 (23:00 +0000)
git-svn-id: file:///svn/unbound/trunk@123 be551aaa-1e26-0410-a405-d3ace91eadb9

configure.ac
doc/Changelog
services/listen_dnsport.c
services/outside_network.c

index 85c273a70cb109b92b34285d604d5256d7d478c8..6cd19144ccc3311d6b19b83bafd0f2c1ca40d877 100644 (file)
@@ -490,11 +490,14 @@ AH_BOTTOM([
 #define IPV6_MIN_MTU 1280
 #endif /* IPV6_MIN_MTU */
 
-#ifdef AF_INET6
-#define INET6
-#else
-#define AF_INET6        28
-#endif
+#ifndef CHECKED_INET6
+#  define CHECKED_INET6
+#  ifdef AF_INET6
+#    define INET6
+#  else
+#    define AF_INET6        28
+#  endif
+#endif /* CHECKED_INET6 */
 
 #ifndef HAVE_SNPRINTF
 #include <stdarg.h>
index 2248faaea504e4b3b7f6ea430ed314ce612a7fd3..97891c92bbb6e5bec9f9b1798b245c9aefeff54a 100644 (file)
@@ -6,6 +6,7 @@
        - added util/mini-event.c and .h, a select based alternative used with
          ./configure --with-libevent=no
          It is limited to 1024 file descriptors, and has less features.
+       - will not create ip6 sockets if ip6 not on the machine.
 
 15 February 2007: Wouter
        - port to FreeBSD 4.11 Dec Alpha. Also works on Solaris 10 sparc64,
index 78dfc0777a869a2e3972385da9e3d13dc3110caa..2c8cf8937bfa3aa08b7ddc315c13c4506ce53812 100644 (file)
@@ -318,6 +318,9 @@ listen_create(struct comm_base* base, int num_ifs, const char* ifs[],
        if(num_ifs > 0)
                hints.ai_flags |= AI_NUMERICHOST;
        hints.ai_family = AF_UNSPEC;
+#ifndef INET6
+       do_ip6 = 0;
+#endif
        if(!do_ip4 && !do_ip6) {
                listen_delete(front);
                return NULL;
index a65ab95ecf9243198c36c44735349840732c7a27..276915d1b65682c85e662ee6bcc9d5b8a15613ac 100644 (file)
@@ -280,6 +280,9 @@ outside_network_create(struct comm_base *base, size_t bufsize,
                return NULL;
        }
        outnet->base = base;
+#ifndef INET6
+       do_ip6 = 0;
+#endif
        calc_num46(ifs, num_ifs, do_ip4, do_ip6, num_ports, 
                &outnet->num_udp4, &outnet->num_udp6);
        /* adds +1 to portnums so we do not allocate zero bytes. */
@@ -303,8 +306,8 @@ outside_network_create(struct comm_base *base, size_t bufsize,
                        outnet->num_udp4 = make_udp_range(outnet->udp4_ports, 
                                NULL, num_ports, 1, 0, port_base, outnet);
                }
-               if(outnet->num_udp4 != num_ports || 
-                       outnet->num_udp6 != num_ports) {
+               if( (do_ip4 && outnet->num_udp4 != num_ports) || 
+                       (do_ip6 && outnet->num_udp6 != num_ports)) {
                        log_err("Could not open all networkside ports");
                        outside_network_delete(outnet);
                        return NULL;