]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
pullup:
authorMark Andrews <marka@isc.org>
Wed, 28 Nov 2001 01:58:18 +0000 (01:58 +0000)
committerMark Andrews <marka@isc.org>
Wed, 28 Nov 2001 01:58:18 +0000 (01:58 +0000)
1140.   [bug]           rndc-confgen did not accept IPv6 addresses as arguments
                        to the -s option. [RT #2138]

CHANGES
bin/rndc/rndc-confgen.c

diff --git a/CHANGES b/CHANGES
index 25050fd9f7e06323f8874295942127b719791af7..4b1c387805281f76f190307acc6fa7916185e5d1 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+1140.  [bug]           rndc-confgen did not accept IPv6 addresses as arguments
+                       to the -s option. [RT #2138]
+
 1142.  [bug]           dnssec-signzone would fail to delete temporary files
                        in some failure cases. [RT #2144]
 
index cd2b619b233b0c8547d6dacd6bd9a8c0a330efa4..e4d36e45b92d73754144065dca8c9098cc3ce6f3 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: rndc-confgen.c,v 1.9.2.1 2001/09/06 00:14:16 gson Exp $ */
+/* $Id: rndc-confgen.c,v 1.9.2.2 2001/11/28 01:58:18 marka Exp $ */
 
 #include <config.h>
 
@@ -139,7 +139,8 @@ main(int argc, char **argv) {
        int keysize;
        int entropy_flags = 0;
        int open_keyboard = ISC_ENTROPY_KEYBOARDMAYBE;
-       struct in_addr addr;
+       struct in_addr addr4_dummy;
+       struct in6_addr addr6_dummy;
        char *chrootdir = NULL;
        char *user = NULL;
        isc_boolean_t keyonly = ISC_FALSE;
@@ -197,9 +198,9 @@ main(int argc, char **argv) {
                        break;
                case 's':
                        serveraddr = isc_commandline_argument;
-                       if (inet_aton(serveraddr, &addr) == 0)
+                       if (inet_pton(AF_INET, serveraddr, &addr4_dummy) != 1 &&
+                           inet_pton(AF_INET6, serveraddr, &addr6_dummy) != 1)
                                fatal("-s should be an IPv4 or IPv6 address");
-                               
                        break;
                case 't':
                        chrootdir = isc_commandline_argument;