mirror of
https://github.com/isc-projects/bind9.git
synced 2026-02-23 01:40:23 -05:00
3863. [bug] The "E" flag was missing from the query log as a
unintended side effect of code rearrangement to
support EDNS EXPIRE. [RT #36117]
This commit is contained in:
parent
3b5fc5809b
commit
5defbb76ea
4 changed files with 19 additions and 5 deletions
4
CHANGES
4
CHANGES
|
|
@ -1,3 +1,7 @@
|
|||
3863. [bug] The "E" flag was missing from the query log as a
|
||||
unintended side effect of code rearrangement to
|
||||
support EDNS EXPIRE. [RT #36117]
|
||||
|
||||
3862. [cleanup] Return immediately if we are not going to log the
|
||||
message in ns_client_dumpmessage.
|
||||
|
||||
|
|
|
|||
|
|
@ -8111,8 +8111,8 @@ log_query(ns_client_t *client, unsigned int flags, unsigned int extflags) {
|
|||
ns_client_log(client, NS_LOGCATEGORY_QUERIES, NS_LOGMODULE_QUERY,
|
||||
level, "query: %s %s %s %s%s%s%s%s%s (%s)", namebuf,
|
||||
classname, typename, WANTRECURSION(client) ? "+" : "-",
|
||||
(client->signer != NULL) ? "S": "",
|
||||
(client->opt != NULL) ? "E" : "",
|
||||
(client->signer != NULL) ? "S" : "",
|
||||
(client->ednsversion >= 0) ? "E" : "",
|
||||
((client->attributes & NS_CLIENTATTR_TCP) != 0) ?
|
||||
"T" : "",
|
||||
((extflags & DNS_MESSAGEEXTFLAG_DO) != 0) ? "D" : "",
|
||||
|
|
@ -8191,8 +8191,6 @@ ns_query_start(ns_client_t *client) {
|
|||
if (!client->view->enablednssec) {
|
||||
message->flags &= ~DNS_MESSAGEFLAG_CD;
|
||||
client->extflags &= ~DNS_MESSAGEEXTFLAG_DO;
|
||||
if (client->opt != NULL)
|
||||
client->opt->ttl &= ~DNS_MESSAGEEXTFLAG_DO;
|
||||
}
|
||||
|
||||
if ((message->flags & DNS_MESSAGEFLAG_RD) != 0)
|
||||
|
|
@ -8304,7 +8302,7 @@ ns_query_start(ns_client_t *client) {
|
|||
/*
|
||||
* Turn on minimal responses for EDNS/UDP bufsize 512 queries.
|
||||
*/
|
||||
if (client->opt != NULL && client->udpsize <= 512U &&
|
||||
if (client->ednsversion >= 0 && client->udpsize <= 512U &&
|
||||
(client->attributes & NS_CLIENTATTR_TCP) == 0)
|
||||
client->query.attributes |= (NS_QUERYATTR_NOAUTHORITY |
|
||||
NS_QUERYATTR_NOADDITIONAL);
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ options {
|
|||
listen-on { 10.53.0.5; };
|
||||
listen-on-v6 { none; };
|
||||
recursion yes;
|
||||
querylog yes;
|
||||
};
|
||||
|
||||
zone "." {
|
||||
|
|
|
|||
|
|
@ -475,5 +475,16 @@ $DIG @10.53.0.5 -p 5300 fetchall.tld any > dig.out.3.${n} || ret=1
|
|||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
n=`expr $n + 1`
|
||||
echo "I:check that E was logged on EDNS queries in the query log (${n})"
|
||||
ret=0
|
||||
grep "query: fetchall.tld IN ANY +E" ns5/named.run > /dev/null || ret=1
|
||||
$DIG @10.53.0.5 -p 5300 +noedns noedns.fetchall.tld any > dig.out.2.${n} || ret=1
|
||||
grep "query: noedns.fetchall.tld IN ANY" ns5/named.run > /dev/null || ret=1
|
||||
grep "query: noedns.fetchall.tld IN ANY +E" ns5/named.run > /dev/null && ret=1
|
||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
|
||||
echo "I:exit status: $status"
|
||||
exit $status
|
||||
|
|
|
|||
Loading…
Reference in a new issue