]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
1610. [bug] On dual stack machines "dig -b" failed to set the
authorMark Andrews <marka@isc.org>
Thu, 15 Apr 2004 06:47:08 +0000 (06:47 +0000)
committerMark Andrews <marka@isc.org>
Thu, 15 Apr 2004 06:47:08 +0000 (06:47 +0000)
                        address type to be looked up with "@server".
                        [RT #11069]

CHANGES
bin/dig/dig.c

diff --git a/CHANGES b/CHANGES
index 680a1e429cdb983a06efac49cc39c44617550994..69f290e41ea570278e12a47ac6e4a8221ad6dd86 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,8 @@
 1611.  [placeholder]   rt11065
 
-1610.  [placeholder]   rt11069
+1610.  [bug]           On dual stack machines "dig -b" failed to set the
+                       address type to be looked up with "@server".
+                       [RT #11069]
 
 1609.  [func]          dig now has support to chase DNSSEC signature chains.
                        Requires -DDIG_SIGCHASE=1 to be set in STD_CDEFINES.
index a2f31badba7af60681ef7fe4c1ab0f9adab1af60..c8a75f2d14a17d8947190a4622ba1076726e3e7c 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: dig.c,v 1.189 2004/04/13 02:54:14 marka Exp $ */
+/* $Id: dig.c,v 1.190 2004/04/15 06:47:08 marka Exp $ */
 
 #include <config.h>
 #include <stdlib.h>
@@ -1147,11 +1147,13 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
                        *hash = '\0';
                } else
                        srcport = 0;
-               if (have_ipv6 && inet_pton(AF_INET6, value, &in6) == 1)
+               if (have_ipv6 && inet_pton(AF_INET6, value, &in6) == 1) {
                        isc_sockaddr_fromin6(&bind_address, &in6, srcport);
-               else if (have_ipv4 && inet_pton(AF_INET, value, &in4) == 1)
+                       isc_net_disableipv4();
+               } else if (have_ipv4 && inet_pton(AF_INET, value, &in4) == 1) {
                        isc_sockaddr_fromin(&bind_address, &in4, srcport);
-               else {
+                       isc_net_disableipv6();
+               } else {
                        if (hash != NULL)
                                *hash = '#';
                        fatal("invalid address %s", value);