Commit c01237c6 authored by Andreas Gustafsson's avatar Andreas Gustafsson

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

                        to the -s option. [RT #2138]
parent c5280616
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
cache(s) via 'rndc flushname name [view]'. [RT #2051]
......
......@@ -15,7 +15,7 @@
* 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>
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment