mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-29 05:28:00 +00:00
[master] Add -4/-6 command line options to nsupdate and rndc
4691. [func] Add -4/-6 command line options to nsupdate and rndc. [RT #45632]
This commit is contained in:
parent
d6814700de
commit
efe7977c4d
3
CHANGES
3
CHANGES
@ -1,3 +1,6 @@
|
|||||||
|
4691. [func] Add -4/-6 command line options to nsupdate and rndc.
|
||||||
|
[RT #45632]
|
||||||
|
|
||||||
4690. [bug] Command line options -4/-6 were handled inconsistently
|
4690. [bug] Command line options -4/-6 were handled inconsistently
|
||||||
between tools. [RT #45632]
|
between tools. [RT #45632]
|
||||||
|
|
||||||
|
@ -850,7 +850,7 @@ setup_system(void) {
|
|||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
isc_sockaddr_t bind_any, bind_any6;
|
isc_sockaddr_t bind_any, bind_any6;
|
||||||
lwres_result_t lwresult;
|
lwres_result_t lwresult;
|
||||||
unsigned int attrs, attrmask;
|
unsigned int attrs, attrmask, flags;
|
||||||
int i;
|
int i;
|
||||||
isc_logconfig_t *logconfig = NULL;
|
isc_logconfig_t *logconfig = NULL;
|
||||||
|
|
||||||
@ -858,17 +858,6 @@ setup_system(void) {
|
|||||||
|
|
||||||
dns_result_register();
|
dns_result_register();
|
||||||
|
|
||||||
result = isc_net_probeipv4();
|
|
||||||
if (result == ISC_R_SUCCESS)
|
|
||||||
have_ipv4 = ISC_TRUE;
|
|
||||||
|
|
||||||
result = isc_net_probeipv6();
|
|
||||||
if (result == ISC_R_SUCCESS)
|
|
||||||
have_ipv6 = ISC_TRUE;
|
|
||||||
|
|
||||||
if (!have_ipv4 && !have_ipv6)
|
|
||||||
fatal("could not find either IPv4 or IPv6");
|
|
||||||
|
|
||||||
result = isc_log_create(gmctx, &glctx, &logconfig);
|
result = isc_log_create(gmctx, &glctx, &logconfig);
|
||||||
check_result(result, "isc_log_create");
|
check_result(result, "isc_log_create");
|
||||||
|
|
||||||
@ -881,7 +870,16 @@ setup_system(void) {
|
|||||||
|
|
||||||
isc_log_setdebuglevel(glctx, logdebuglevel);
|
isc_log_setdebuglevel(glctx, logdebuglevel);
|
||||||
|
|
||||||
lwresult = lwres_context_create(&lwctx, gmctx, mem_alloc, mem_free, 1);
|
flags = LWRES_CONTEXT_SERVERMODE;
|
||||||
|
if (have_ipv4) {
|
||||||
|
flags |= LWRES_CONTEXT_USEIPV4;
|
||||||
|
}
|
||||||
|
if (have_ipv6) {
|
||||||
|
flags |= LWRES_CONTEXT_USEIPV6;
|
||||||
|
}
|
||||||
|
|
||||||
|
lwresult = lwres_context_create(&lwctx, gmctx, mem_alloc, mem_free,
|
||||||
|
flags);
|
||||||
if (lwresult != LWRES_R_SUCCESS)
|
if (lwresult != LWRES_R_SUCCESS)
|
||||||
fatal("lwres_context_create failed");
|
fatal("lwres_context_create failed");
|
||||||
|
|
||||||
@ -909,15 +907,15 @@ setup_system(void) {
|
|||||||
if (servers == NULL)
|
if (servers == NULL)
|
||||||
fatal("out of memory");
|
fatal("out of memory");
|
||||||
|
|
||||||
if (have_ipv4) {
|
|
||||||
in.s_addr = htonl(INADDR_LOOPBACK);
|
|
||||||
isc_sockaddr_fromin(&servers[0], &in, dnsport);
|
|
||||||
}
|
|
||||||
if (have_ipv6) {
|
if (have_ipv6) {
|
||||||
memset(&in6, 0, sizeof(in6));
|
memset(&in6, 0, sizeof(in6));
|
||||||
in6.s6_addr[15] = 1;
|
in6.s6_addr[15] = 1;
|
||||||
isc_sockaddr_fromin6(&servers[(have_ipv4 ? 1 : 0)],
|
isc_sockaddr_fromin6(&servers[0], &in6, dnsport);
|
||||||
&in6, dnsport);
|
}
|
||||||
|
if (have_ipv4) {
|
||||||
|
in.s_addr = htonl(INADDR_LOOPBACK);
|
||||||
|
isc_sockaddr_fromin(&servers[(have_ipv6 ? 1 : 0)],
|
||||||
|
&in, dnsport);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ns_total = ns_alloc = lwconf->nsnext;
|
ns_total = ns_alloc = lwconf->nsnext;
|
||||||
@ -1034,7 +1032,7 @@ version(void) {
|
|||||||
fputs("nsupdate " VERSION "\n", stderr);
|
fputs("nsupdate " VERSION "\n", stderr);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define PARSE_ARGS_FMT "dDML:y:ghilovk:p:Pr:R::t:Tu:V"
|
#define PARSE_ARGS_FMT "46dDML:y:ghilovk:p:Pr:R::t:Tu:V"
|
||||||
|
|
||||||
static void
|
static void
|
||||||
pre_parse_args(int argc, char **argv) {
|
pre_parse_args(int argc, char **argv) {
|
||||||
@ -1042,6 +1040,7 @@ pre_parse_args(int argc, char **argv) {
|
|||||||
int ch;
|
int ch;
|
||||||
char buf[100];
|
char buf[100];
|
||||||
isc_boolean_t doexit = ISC_FALSE;
|
isc_boolean_t doexit = ISC_FALSE;
|
||||||
|
isc_boolean_t ipv4only = ISC_FALSE, ipv6only = ISC_FALSE;
|
||||||
|
|
||||||
while ((ch = isc_commandline_parse(argc, argv, PARSE_ARGS_FMT)) != -1) {
|
while ((ch = isc_commandline_parse(argc, argv, PARSE_ARGS_FMT)) != -1) {
|
||||||
switch (ch) {
|
switch (ch) {
|
||||||
@ -1053,6 +1052,20 @@ pre_parse_args(int argc, char **argv) {
|
|||||||
ISC_MEM_DEBUGRECORD;
|
ISC_MEM_DEBUGRECORD;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case '4':
|
||||||
|
if (ipv6only) {
|
||||||
|
fatal("only one of -4 and -6 allowed");
|
||||||
|
}
|
||||||
|
ipv4only = ISC_TRUE;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case '6':
|
||||||
|
if (ipv4only) {
|
||||||
|
fatal("only one of -4 and -6 allowed");
|
||||||
|
}
|
||||||
|
ipv6only = ISC_TRUE;
|
||||||
|
break;
|
||||||
|
|
||||||
case '?':
|
case '?':
|
||||||
case 'h':
|
case 'h':
|
||||||
if (isc_commandline_option != '?')
|
if (isc_commandline_option != '?')
|
||||||
@ -1060,7 +1073,7 @@ pre_parse_args(int argc, char **argv) {
|
|||||||
argv[0], isc_commandline_option);
|
argv[0], isc_commandline_option);
|
||||||
fprintf(stderr, "usage: nsupdate [-dDi] [-L level] [-l]"
|
fprintf(stderr, "usage: nsupdate [-dDi] [-L level] [-l]"
|
||||||
"[-g | -o | -y keyname:secret | -k keyfile] "
|
"[-g | -o | -y keyname:secret | -k keyfile] "
|
||||||
"[-v] [-V] [-P] [-T] [filename]\n");
|
"[-v] [-V] [-P] [-T] [-4 | -6] [filename]\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|
||||||
case 'P':
|
case 'P':
|
||||||
@ -1110,6 +1123,22 @@ parse_args(int argc, char **argv, isc_mem_t *mctx, isc_entropy_t **ectx) {
|
|||||||
debug("parse_args");
|
debug("parse_args");
|
||||||
while ((ch = isc_commandline_parse(argc, argv, PARSE_ARGS_FMT)) != -1) {
|
while ((ch = isc_commandline_parse(argc, argv, PARSE_ARGS_FMT)) != -1) {
|
||||||
switch (ch) {
|
switch (ch) {
|
||||||
|
case '4':
|
||||||
|
if (have_ipv4) {
|
||||||
|
isc_net_disableipv6();
|
||||||
|
have_ipv6 = ISC_FALSE;
|
||||||
|
} else {
|
||||||
|
fatal("can't find IPv4 networking");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case '6':
|
||||||
|
if (have_ipv6) {
|
||||||
|
isc_net_disableipv4();
|
||||||
|
have_ipv4 = ISC_FALSE;
|
||||||
|
} else {
|
||||||
|
fatal("can't find IPv6 networking");
|
||||||
|
}
|
||||||
|
break;
|
||||||
case 'd':
|
case 'd':
|
||||||
debugging = ISC_TRUE;
|
debugging = ISC_TRUE;
|
||||||
break;
|
break;
|
||||||
@ -3289,6 +3318,16 @@ main(int argc, char **argv) {
|
|||||||
|
|
||||||
isc_app_start();
|
isc_app_start();
|
||||||
|
|
||||||
|
if (isc_net_probeipv4() == ISC_R_SUCCESS) {
|
||||||
|
have_ipv4 = ISC_TRUE;
|
||||||
|
}
|
||||||
|
if (isc_net_probeipv6() == ISC_R_SUCCESS) {
|
||||||
|
have_ipv6 = ISC_TRUE;
|
||||||
|
}
|
||||||
|
if (!have_ipv4 && !have_ipv6) {
|
||||||
|
fatal("could not find either IPv4 or IPv6");
|
||||||
|
}
|
||||||
|
|
||||||
pre_parse_args(argc, argv);
|
pre_parse_args(argc, argv);
|
||||||
|
|
||||||
result = isc_mem_create(0, 0, &gmctx);
|
result = isc_mem_create(0, 0, &gmctx);
|
||||||
|
@ -71,6 +71,10 @@
|
|||||||
<arg choice="opt" rep="norepeat"><option>-T</option></arg>
|
<arg choice="opt" rep="norepeat"><option>-T</option></arg>
|
||||||
<arg choice="opt" rep="norepeat"><option>-P</option></arg>
|
<arg choice="opt" rep="norepeat"><option>-P</option></arg>
|
||||||
<arg choice="opt" rep="norepeat"><option>-V</option></arg>
|
<arg choice="opt" rep="norepeat"><option>-V</option></arg>
|
||||||
|
<group choice="opt" rep="norepeat">
|
||||||
|
<arg choice="opt" rep="norepeat"><option>-4</option></arg>
|
||||||
|
<arg choice="opt" rep="norepeat"><option>-6</option></arg>
|
||||||
|
</group>
|
||||||
<arg choice="opt" rep="norepeat">filename</arg>
|
<arg choice="opt" rep="norepeat">filename</arg>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
@ -138,6 +142,24 @@
|
|||||||
|
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
|
<varlistentry>
|
||||||
|
<term>-4</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Use IPv4 only.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term>-6</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Use IPv6 only.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>-d</term>
|
<term>-d</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
|
@ -92,7 +92,7 @@ static void
|
|||||||
usage(int status) {
|
usage(int status) {
|
||||||
fprintf(stderr, "\
|
fprintf(stderr, "\
|
||||||
Usage: %s [-b address] [-c config] [-s server] [-p port]\n\
|
Usage: %s [-b address] [-c config] [-s server] [-p port]\n\
|
||||||
[-k key-file ] [-y key] [-r] [-V] command\n\
|
[-k key-file ] [-y key] [-r] [-V] [-4 | -6] command\n\
|
||||||
\n\
|
\n\
|
||||||
command is one of the following:\n\
|
command is one of the following:\n\
|
||||||
\n\
|
\n\
|
||||||
@ -211,6 +211,36 @@ Version: %s\n",
|
|||||||
exit(status);
|
exit(status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define CMDLINE_FLAGS "46b:c:hk:Mmp:qrs:Vy:"
|
||||||
|
|
||||||
|
static void
|
||||||
|
preparse_args(int argc, char **argv) {
|
||||||
|
isc_boolean_t ipv4only = ISC_FALSE, ipv6only = ISC_FALSE;
|
||||||
|
int ch;
|
||||||
|
|
||||||
|
while ((ch = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != -1) {
|
||||||
|
switch (ch) {
|
||||||
|
case '4':
|
||||||
|
if (ipv6only) {
|
||||||
|
fatal("only one of -4 and -6 allowed");
|
||||||
|
}
|
||||||
|
ipv4only = ISC_TRUE;
|
||||||
|
break;
|
||||||
|
case '6':
|
||||||
|
if (ipv4only) {
|
||||||
|
fatal("only one of -4 and -6 allowed");
|
||||||
|
}
|
||||||
|
ipv6only = ISC_TRUE;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
isc_commandline_reset = ISC_TRUE;
|
||||||
|
isc_commandline_index = 1;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
get_addresses(const char *host, in_port_t port) {
|
get_addresses(const char *host, in_port_t port) {
|
||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
@ -802,9 +832,22 @@ main(int argc, char **argv) {
|
|||||||
|
|
||||||
isc_commandline_errprint = ISC_FALSE;
|
isc_commandline_errprint = ISC_FALSE;
|
||||||
|
|
||||||
while ((ch = isc_commandline_parse(argc, argv, "b:c:hk:Mmp:qrs:Vy:"))
|
preparse_args(argc, argv);
|
||||||
!= -1) {
|
|
||||||
|
while ((ch = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != -1) {
|
||||||
switch (ch) {
|
switch (ch) {
|
||||||
|
case '4':
|
||||||
|
if (isc_net_probeipv4() != ISC_R_SUCCESS) {
|
||||||
|
fatal("can't find IPv4 networking");
|
||||||
|
}
|
||||||
|
isc_net_disableipv6();
|
||||||
|
break;
|
||||||
|
case '6':
|
||||||
|
if (isc_net_probeipv6() != ISC_R_SUCCESS) {
|
||||||
|
fatal("can't find IPv6 networking");
|
||||||
|
}
|
||||||
|
isc_net_disableipv4();
|
||||||
|
break;
|
||||||
case 'b':
|
case 'b':
|
||||||
if (inet_pton(AF_INET, isc_commandline_argument,
|
if (inet_pton(AF_INET, isc_commandline_argument,
|
||||||
&in) == 1) {
|
&in) == 1) {
|
||||||
|
@ -55,6 +55,10 @@
|
|||||||
<arg choice="opt" rep="norepeat"><option>-r</option></arg>
|
<arg choice="opt" rep="norepeat"><option>-r</option></arg>
|
||||||
<arg choice="opt" rep="norepeat"><option>-V</option></arg>
|
<arg choice="opt" rep="norepeat"><option>-V</option></arg>
|
||||||
<arg choice="opt" rep="norepeat"><option>-y <replaceable class="parameter">key_id</replaceable></option></arg>
|
<arg choice="opt" rep="norepeat"><option>-y <replaceable class="parameter">key_id</replaceable></option></arg>
|
||||||
|
<group choice="opt" rep="norepeat">
|
||||||
|
<arg choice="opt" rep="norepeat"><option>-4</option></arg>
|
||||||
|
<arg choice="opt" rep="norepeat"><option>-6</option></arg>
|
||||||
|
</group>
|
||||||
<arg choice="req" rep="norepeat">command</arg>
|
<arg choice="req" rep="norepeat">command</arg>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
@ -95,6 +99,24 @@
|
|||||||
|
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
|
<varlistentry>
|
||||||
|
<term>-4</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Use IPv4 only.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term>-6</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Use IPv6 only.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>-b <replaceable class="parameter">source-address</replaceable></term>
|
<term>-b <replaceable class="parameter">source-address</replaceable></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
|
@ -90,7 +90,7 @@ pre=`$DIG +short new.other.nil. @10.53.0.1 a -p 5300` || ret=1
|
|||||||
ret=0
|
ret=0
|
||||||
echo "I:updating zone"
|
echo "I:updating zone"
|
||||||
# nsupdate will print a ">" prompt to stdout as it gets each input line.
|
# nsupdate will print a ">" prompt to stdout as it gets each input line.
|
||||||
$NSUPDATE -l -p 5300 -k ns1/session.key > /dev/null <<END || ret=1
|
$NSUPDATE -4 -l -p 5300 -k ns1/session.key > /dev/null <<END || ret=1
|
||||||
zone other.nil.
|
zone other.nil.
|
||||||
update add new.other.nil. 600 IN A 10.10.10.1
|
update add new.other.nil. 600 IN A 10.10.10.1
|
||||||
send
|
send
|
||||||
@ -114,13 +114,13 @@ $PERL ../digcomp.pl knowngood.ns1.after dig.out.ns1 || ret=1
|
|||||||
ret=0
|
ret=0
|
||||||
echo "I:testing zone consistency checks"
|
echo "I:testing zone consistency checks"
|
||||||
# inserting an NS record without a corresponding A or AAAA record should fail
|
# inserting an NS record without a corresponding A or AAAA record should fail
|
||||||
$NSUPDATE -l -p 5300 -k ns1/session.key > nsupdate.out 2>&1 << END && ret=1
|
$NSUPDATE -4 -l -p 5300 -k ns1/session.key > nsupdate.out 2>&1 << END && ret=1
|
||||||
update add other.nil. 600 in ns ns3.other.nil.
|
update add other.nil. 600 in ns ns3.other.nil.
|
||||||
send
|
send
|
||||||
END
|
END
|
||||||
grep REFUSED nsupdate.out > /dev/null 2>&1 || ret=1
|
grep REFUSED nsupdate.out > /dev/null 2>&1 || ret=1
|
||||||
# ...but should work if an A record is inserted first:
|
# ...but should work if an A record is inserted first:
|
||||||
$NSUPDATE -l -p 5300 -k ns1/session.key > nsupdate.out 2>&1 << END || ret=1
|
$NSUPDATE -4 -l -p 5300 -k ns1/session.key > nsupdate.out 2>&1 << END || ret=1
|
||||||
update add ns4.other.nil 600 in a 10.53.0.1
|
update add ns4.other.nil 600 in a 10.53.0.1
|
||||||
send
|
send
|
||||||
update add other.nil. 600 in ns ns4.other.nil.
|
update add other.nil. 600 in ns ns4.other.nil.
|
||||||
@ -128,7 +128,7 @@ send
|
|||||||
END
|
END
|
||||||
grep REFUSED nsupdate.out > /dev/null 2>&1 && ret=1
|
grep REFUSED nsupdate.out > /dev/null 2>&1 && ret=1
|
||||||
# ...or if an AAAA record does:
|
# ...or if an AAAA record does:
|
||||||
$NSUPDATE -l -p 5300 -k ns1/session.key > nsupdate.out 2>&1 << END || ret=1
|
$NSUPDATE -4 -l -p 5300 -k ns1/session.key > nsupdate.out 2>&1 << END || ret=1
|
||||||
update add ns5.other.nil 600 in aaaa 2001:db8::1
|
update add ns5.other.nil 600 in aaaa 2001:db8::1
|
||||||
send
|
send
|
||||||
update add other.nil. 600 in ns ns5.other.nil.
|
update add other.nil. 600 in ns ns5.other.nil.
|
||||||
@ -136,7 +136,7 @@ send
|
|||||||
END
|
END
|
||||||
grep REFUSED nsupdate.out > /dev/null 2>&1 && ret=1
|
grep REFUSED nsupdate.out > /dev/null 2>&1 && ret=1
|
||||||
# ...or if the NS and A/AAAA are inserted together:
|
# ...or if the NS and A/AAAA are inserted together:
|
||||||
$NSUPDATE -l -p 5300 -k ns1/session.key > nsupdate.out 2>&1 << END || ret=1
|
$NSUPDATE -4 -l -p 5300 -k ns1/session.key > nsupdate.out 2>&1 << END || ret=1
|
||||||
update add other.nil. 600 in ns ns6.other.nil.
|
update add other.nil. 600 in ns ns6.other.nil.
|
||||||
update add ns6.other.nil 600 in a 10.53.0.1
|
update add ns6.other.nil 600 in a 10.53.0.1
|
||||||
send
|
send
|
||||||
@ -457,7 +457,7 @@ $PERL ../digcomp.pl knowngood.ns1.afterstop dig.out.ns1 || ret=1
|
|||||||
|
|
||||||
ret=0
|
ret=0
|
||||||
echo "I:check that 'nsupdate -l' with a missing keyfile reports the missing file"
|
echo "I:check that 'nsupdate -l' with a missing keyfile reports the missing file"
|
||||||
$NSUPDATE -l -p 5300 -k ns1/nonexistant.key 2> nsupdate.out < /dev/null
|
$NSUPDATE -4 -l -p 5300 -k ns1/nonexistant.key 2> nsupdate.out < /dev/null
|
||||||
grep ns1/nonexistant.key nsupdate.out > /dev/null || ret=1
|
grep ns1/nonexistant.key nsupdate.out > /dev/null || ret=1
|
||||||
if test $ret -ne 0
|
if test $ret -ne 0
|
||||||
then
|
then
|
||||||
@ -816,6 +816,32 @@ END
|
|||||||
grep "couldn't get address for 'unresolvable..': not found" nsupdate.out > /dev/null || ret=1
|
grep "couldn't get address for 'unresolvable..': not found" nsupdate.out > /dev/null || ret=1
|
||||||
[ $ret = 0 ] || { echo I:failed; status=1; }
|
[ $ret = 0 ] || { echo I:failed; status=1; }
|
||||||
|
|
||||||
|
n=`expr $n + 1`
|
||||||
|
ret=0
|
||||||
|
echo "I:check nsupdate -4 -6 ($n)"
|
||||||
|
$NSUPDATE -4 -6 <<END > nsupdate.out-$n 2>&1 && ret=1
|
||||||
|
server 10.53.0.3 5300
|
||||||
|
zone delegation.test.
|
||||||
|
update del child.delegation.test. 3600 NS foo.example.net.
|
||||||
|
update del child.delegation.test. 3600 NS bar.example.net.
|
||||||
|
send
|
||||||
|
END
|
||||||
|
grep "only one of -4 and -6 allowed" nsupdate.out-$n > /dev/null 2>&1 || ret=1
|
||||||
|
[ $ret = 0 ] || { echo I:failed; status=1; }
|
||||||
|
|
||||||
|
n=`expr $n + 1`
|
||||||
|
ret=0
|
||||||
|
echo "I:check nsupdate -4 with an IPv6 server address ($n)"
|
||||||
|
$NSUPDATE -4 <<END > nsupdate.out-$n 2>&1 && ret=1
|
||||||
|
server fd92:7065:b8e:ffff::2 5300
|
||||||
|
zone delegation.test.
|
||||||
|
update del child.delegation.test. 3600 NS foo.example.net.
|
||||||
|
update del child.delegation.test. 3600 NS bar.example.net.
|
||||||
|
send
|
||||||
|
END
|
||||||
|
grep "address family not supported" nsupdate.out-$n > /dev/null 2>&1 || ret=1
|
||||||
|
[ $ret = 0 ] || { echo I:failed; status=1; }
|
||||||
|
|
||||||
#
|
#
|
||||||
# Add client library tests here
|
# Add client library tests here
|
||||||
#
|
#
|
||||||
|
@ -639,5 +639,21 @@ grep "rndc: '' failed: failure" rndc.out.1.test$n > /dev/null
|
|||||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||||
status=`expr $status + $ret`
|
status=`expr $status + $ret`
|
||||||
|
|
||||||
|
n=`expr $n + 1`
|
||||||
|
echo "I:check rndc -4 -6 ($n)"
|
||||||
|
ret=0
|
||||||
|
$RNDCCMD -4 -6 status > rndc.out.1.test$n 2>&1 && ret=1
|
||||||
|
grep "only one of -4 and -6 allowed" rndc.out.1.test$n > /dev/null || ret=1
|
||||||
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||||
|
status=`expr $status + $ret`
|
||||||
|
|
||||||
|
n=`expr $n + 1`
|
||||||
|
echo "I:check rndc -4 with an IPv6 server address ($n)"
|
||||||
|
ret=0
|
||||||
|
$RNDCCMD -4 -s fd92:7065:b8e:ffff::2 status > rndc.out.1.test$n 2>&1 && ret=1
|
||||||
|
grep "address family not supported" rndc.out.1.test$n > /dev/null || ret=1
|
||||||
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||||
|
status=`expr $status + $ret`
|
||||||
|
|
||||||
echo "I:exit status: $status"
|
echo "I:exit status: $status"
|
||||||
[ $status -eq 0 ] || exit 1
|
[ $status -eq 0 ] || exit 1
|
||||||
|
@ -181,6 +181,13 @@
|
|||||||
|
|
||||||
<section xml:id="relnotes_features"><info><title>New Features</title></info>
|
<section xml:id="relnotes_features"><info><title>New Features</title></info>
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
<command>nsupdate</command> and <command>rndc</command> now accept
|
||||||
|
command line options <command>-4</command> and <command>-6</command>
|
||||||
|
which force using only IPv4 or only IPv6, respectively. [RT #45632]
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
<command>nsec3hash -r</command> ("rdata order") takes arguments
|
<command>nsec3hash -r</command> ("rdata order") takes arguments
|
||||||
|
Loading…
x
Reference in New Issue
Block a user