2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 14:07:59 +00:00

1140. [bug] rndc-confgen did not accept IPv6 addresses as arguments

to the -s option. [RT #2138]
This commit is contained in:
Andreas Gustafsson
2001-11-27 20:59:52 +00:00
parent c52806164c
commit c01237c6bc
2 changed files with 8 additions and 4 deletions

View File

@@ -1,3 +1,6 @@
1140. [bug] rndc-confgen did not accept IPv6 addresses as arguments
to the -s option. [RT #2138]
1139. [func] It is now possible to flush a given name from the 1139. [func] It is now possible to flush a given name from the
cache(s) via 'rndc flushname name [view]'. [RT #2051] cache(s) via 'rndc flushname name [view]'. [RT #2051]

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: rndc-confgen.c,v 1.11 2001/09/06 23:14:37 gson Exp $ */ /* $Id: rndc-confgen.c,v 1.12 2001/11/27 20:59:52 gson Exp $ */
#include <config.h> #include <config.h>
@@ -139,7 +139,8 @@ main(int argc, char **argv) {
int keysize; int keysize;
int entropy_flags = 0; int entropy_flags = 0;
int open_keyboard = ISC_ENTROPY_KEYBOARDMAYBE; int open_keyboard = ISC_ENTROPY_KEYBOARDMAYBE;
struct in_addr addr; struct in_addr addr4_dummy;
struct in6_addr addr6_dummy;
char *chrootdir = NULL; char *chrootdir = NULL;
char *user = NULL; char *user = NULL;
isc_boolean_t keyonly = ISC_FALSE; isc_boolean_t keyonly = ISC_FALSE;
@@ -197,9 +198,9 @@ main(int argc, char **argv) {
break; break;
case 's': case 's':
serveraddr = isc_commandline_argument; 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"); fatal("-s should be an IPv4 or IPv6 address");
break; break;
case 't': case 't':
chrootdir = isc_commandline_argument; chrootdir = isc_commandline_argument;