Merge branch 'each-mdig-multi-norrcomments' into 'master'
minor bugfix in mdig: when using +multi, +norrcomments was ignored See merge request isc-projects/bind9!2208
This commit is contained in:
@@ -109,19 +109,19 @@ if [ -x "$DIG" ] ; then
|
||||
status=$((status+ret))
|
||||
|
||||
n=$((n+1))
|
||||
echo_i "checking dig +multi +norrcomments works for dnskey (when default is rrcomments)($n)"
|
||||
echo_i "checking dig +multi +norrcomments works for DNSKEY (when default is rrcomments)($n)"
|
||||
ret=0
|
||||
dig_with_opts +tcp @10.53.0.3 +multi +norrcomments DNSKEY dnskey.example > dig.out.test$n || ret=1
|
||||
grep "; ZSK; alg = $DEFAULT_ALGORITHM ; key id = $KEYID" < dig.out.test$n > /dev/null && ret=1
|
||||
dig_with_opts +tcp @10.53.0.3 +multi +norrcomments -t DNSKEY dnskey.example > dig.out.test$n || ret=1
|
||||
grep "; ZSK; alg = $DEFAULT_ALGORITHM ; key id = $KEYID" dig.out.test$n > /dev/null && ret=1
|
||||
check_ttl_range dig.out.test$n "DNSKEY" 300 || ret=1
|
||||
if [ $ret -ne 0 ]; then echo_i "failed"; fi
|
||||
status=$((status+ret))
|
||||
|
||||
n=$((n+1))
|
||||
echo_i "checking dig +multi +norrcomments works for soa (when default is rrcomments)($n)"
|
||||
echo_i "checking dig +multi +norrcomments works for SOA (when default is rrcomments)($n)"
|
||||
ret=0
|
||||
dig_with_opts +tcp @10.53.0.3 +multi +norrcomments SOA example > dig.out.test$n || ret=1
|
||||
grep "; ZSK; alg = $DEFAULT_ALGORITHM ; key id = $KEYID" < dig.out.test$n > /dev/null && ret=1
|
||||
dig_with_opts +tcp @10.53.0.3 +multi +norrcomments -t SOA example > dig.out.test$n || ret=1
|
||||
grep "; serial" dig.out.test$n > /dev/null && ret=1
|
||||
check_ttl_range dig.out.test$n "SOA" 300 || ret=1
|
||||
if [ $ret -ne 0 ]; then echo_i "failed"; fi
|
||||
status=$((status+ret))
|
||||
@@ -728,6 +728,22 @@ if [ -x "$MDIG" ] ; then
|
||||
grep "ednsopt no code point specified" dig.out.test$n > /dev/null || ret=1
|
||||
if [ $ret -ne 0 ]; then echo_i "failed"; fi
|
||||
status=$((status+ret))
|
||||
|
||||
n=$((n+1))
|
||||
echo_i "checking mdig +multi +norrcomments works for DNSKEY (when default is rrcomments)($n)"
|
||||
ret=0
|
||||
mdig_with_opts +tcp @10.53.0.3 +multi +norrcomments -t DNSKEY dnskey.example > dig.out.test$n || ret=1
|
||||
grep "; ZSK; alg = $DEFAULT_ALGORITHM ; key id = $KEYID" dig.out.test$n && ret=1
|
||||
if [ $ret -ne 0 ]; then echo_i "failed"; fi
|
||||
status=$((status+ret))
|
||||
|
||||
n=$((n+1))
|
||||
echo_i "checking mdig +multi +norrcomments works for SOA (when default is rrcomments)($n)"
|
||||
ret=0
|
||||
mdig_with_opts +tcp @10.53.0.3 +multi +norrcomments -t SOA example > dig.out.test$n || ret=1
|
||||
grep "; serial" < dig.out.test$n > /dev/null && ret=1
|
||||
if [ $ret -ne 0 ]; then echo_i "failed"; fi
|
||||
status=$((status+ret))
|
||||
else
|
||||
echo_i "$MDIG is needed, so skipping these mdig tests"
|
||||
fi
|
||||
@@ -823,7 +839,7 @@ if [ -x "$DELV" ] ; then
|
||||
status=$((status+ret))
|
||||
|
||||
n=$((n+1))
|
||||
echo_i "checking delv +multi +norrcomments works for dnskey (when default is rrcomments)($n)"
|
||||
echo_i "checking delv +multi +norrcomments works for DNSKEY (when default is rrcomments)($n)"
|
||||
ret=0
|
||||
delv_with_opts +tcp @10.53.0.3 +multi +norrcomments DNSKEY dnskey.example > delv.out.test$n || ret=1
|
||||
grep "; ZSK; alg = $DEFAULT_ALGORITHM ; key id = $KEYID" < delv.out.test$n > /dev/null && ret=1
|
||||
@@ -832,7 +848,7 @@ if [ -x "$DELV" ] ; then
|
||||
status=$((status+ret))
|
||||
|
||||
n=$((n+1))
|
||||
echo_i "checking delv +multi +norrcomments works for soa (when default is rrcomments)($n)"
|
||||
echo_i "checking delv +multi +norrcomments works for SOA (when default is rrcomments)($n)"
|
||||
ret=0
|
||||
delv_with_opts +tcp @10.53.0.3 +multi +norrcomments SOA example > delv.out.test$n || ret=1
|
||||
grep "; ZSK; alg = $DEFAULT_ALGORITHM ; key id = $KEYID" < delv.out.test$n > /dev/null && ret=1
|
||||
|
||||
@@ -94,7 +94,7 @@ static bool besteffort = true;
|
||||
static bool display_short_form = false;
|
||||
static bool display_headers = true;
|
||||
static bool display_comments = true;
|
||||
static bool display_rrcomments = true;
|
||||
static int display_rrcomments = 0;
|
||||
static bool display_ttlunits = true;
|
||||
static bool display_ttl = true;
|
||||
static bool display_class = true;
|
||||
@@ -247,7 +247,7 @@ recvresponse(isc_task_t *task, isc_event_t *event) {
|
||||
styleflags |= DNS_STYLEFLAG_COMMENT;
|
||||
if (display_unknown_format)
|
||||
styleflags |= DNS_STYLEFLAG_UNKNOWNFORMAT;
|
||||
if (display_rrcomments)
|
||||
if (display_rrcomments > 0)
|
||||
styleflags |= DNS_STYLEFLAG_RRCOMMENT;
|
||||
if (display_ttlunits)
|
||||
styleflags |= DNS_STYLEFLAG_TTL_UNITS;
|
||||
@@ -265,7 +265,10 @@ recvresponse(isc_task_t *task, isc_event_t *event) {
|
||||
styleflags |= DNS_STYLEFLAG_TTL;
|
||||
styleflags |= DNS_STYLEFLAG_MULTILINE;
|
||||
styleflags |= DNS_STYLEFLAG_COMMENT;
|
||||
styleflags |= DNS_STYLEFLAG_RRCOMMENT;
|
||||
/* Turn on rrcomments unless explicitly disabled */
|
||||
if (display_rrcomments >= 0) {
|
||||
styleflags |= DNS_STYLEFLAG_RRCOMMENT;
|
||||
}
|
||||
}
|
||||
if (display_multiline || (!display_ttl && !display_class))
|
||||
result = dns_master_stylecreate(&style, styleflags,
|
||||
@@ -1100,7 +1103,7 @@ plus_option(char *option, struct query *query, bool global)
|
||||
display_authority = state;
|
||||
display_additional = state;
|
||||
display_comments = state;
|
||||
display_rrcomments = state;
|
||||
display_rrcomments = state ? 1 : -1;
|
||||
break;
|
||||
case 'n': /* answer */
|
||||
FULLCHECK("answer");
|
||||
@@ -1349,7 +1352,7 @@ plus_option(char *option, struct query *query, bool global)
|
||||
case 'r':
|
||||
FULLCHECK("rrcomments");
|
||||
GLOBAL();
|
||||
display_rrcomments = state;
|
||||
display_rrcomments = state ? 1 : -1;
|
||||
break;
|
||||
default:
|
||||
goto invalid_option;
|
||||
@@ -1367,7 +1370,7 @@ plus_option(char *option, struct query *query, bool global)
|
||||
display_authority = false;
|
||||
display_additional = false;
|
||||
display_comments = false;
|
||||
display_rrcomments = false;
|
||||
display_rrcomments = -1;
|
||||
}
|
||||
break;
|
||||
case 'p': /* split */
|
||||
|
||||
Reference in New Issue
Block a user