mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-09 13:42:06 -04:00
4534. [bug] Only set RD, RA and CD in QUERY responses. [RT #43879]
This commit is contained in:
parent
3105d9c9f3
commit
def6b33bad
4 changed files with 15 additions and 3 deletions
2
CHANGES
2
CHANGES
|
|
@ -1,3 +1,5 @@
|
|||
4534. [bug] Only set RD, RA and CD in QUERY responses. [RT #43879]
|
||||
|
||||
4533. [bug] dns_client_update should terminate on prerequisite
|
||||
failures (NXDOMAIN, YXDOMAIN, NXRRSET, YXRRSET)
|
||||
and also on BADZONE. [RT #43865]
|
||||
|
|
|
|||
|
|
@ -1017,7 +1017,8 @@ client_send(ns_client_t *client) {
|
|||
|
||||
CTRACE("send");
|
||||
|
||||
if ((client->attributes & NS_CLIENTATTR_RA) != 0)
|
||||
if (client->message->opcode == dns_opcode_query &&
|
||||
(client->attributes & NS_CLIENTATTR_RA) != 0)
|
||||
client->message->flags |= DNS_MESSAGEFLAG_RA;
|
||||
|
||||
if ((client->attributes & NS_CLIENTATTR_WANTDNSSEC) != 0)
|
||||
|
|
|
|||
|
|
@ -575,8 +575,14 @@ status=`expr $status + $ret`
|
|||
n=`expr $n + 1`
|
||||
echo "I:check that unexpected opcodes are handled correctly (${n})"
|
||||
ret=0
|
||||
$DIG soa all-cnames @10.53.0.5 -p 5300 +opcode=status > dig.out.ns5.test${n} || ret=1
|
||||
$DIG soa all-cnames @10.53.0.5 -p 5300 +opcode=15 +cd +rec +ad +zflag > dig.out.ns5.test${n} || ret=1
|
||||
grep "status: NOTIMP" dig.out.ns5.test${n} > /dev/null || ret=1
|
||||
grep "flags:[^;]* qr[; ]" dig.out.ns5.test${n} > /dev/null || ret=1
|
||||
grep "flags:[^;]* ra[; ]" dig.out.ns5.test${n} > /dev/null && ret=1
|
||||
grep "flags:[^;]* rd[; ]" dig.out.ns5.test${n} > /dev/null && ret=1
|
||||
grep "flags:[^;]* cd[; ]" dig.out.ns5.test${n} > /dev/null && ret=1
|
||||
grep "flags:[^;]* ad[; ]" dig.out.ns5.test${n} > /dev/null && ret=1
|
||||
grep "flags:[^;]*; MBZ: " dig.out.ns5.test${n} > /dev/null && ret=1
|
||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
|
|
|
|||
|
|
@ -2591,7 +2591,10 @@ dns_message_reply(dns_message_t *msg, isc_boolean_t want_question_section) {
|
|||
* We now clear most flags and then set QR, ensuring that the
|
||||
* reply's flags will be in a reasonable state.
|
||||
*/
|
||||
msg->flags &= DNS_MESSAGE_REPLYPRESERVE;
|
||||
if (msg->opcode == dns_opcode_query)
|
||||
msg->flags &= DNS_MESSAGE_REPLYPRESERVE;
|
||||
else
|
||||
msg->flags = 0;
|
||||
msg->flags |= DNS_MESSAGEFLAG_QR;
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue