mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 22:15:20 +00:00
[rt36611]
3903. [bug] Improve the accuracy of DiG's reported round trip time. [RT 36611]
This commit is contained in:
3
CHANGES
3
CHANGES
@@ -1,3 +1,6 @@
|
||||
3903. [bug] Improve the accuracy of DiG's reported round trip
|
||||
time. [RT 36611]
|
||||
|
||||
3902. [bug] liblwres wasn't handling link-local addresses in
|
||||
nameserver clauses in resolv.conf. [RT #36039]
|
||||
|
||||
|
@@ -257,7 +257,6 @@ help(void) {
|
||||
void
|
||||
received(int bytes, isc_sockaddr_t *from, dig_query_t *query) {
|
||||
isc_uint64_t diff;
|
||||
isc_time_t now;
|
||||
time_t tnow;
|
||||
struct tm tmnow;
|
||||
char time_str[100];
|
||||
@@ -265,10 +264,8 @@ received(int bytes, isc_sockaddr_t *from, dig_query_t *query) {
|
||||
|
||||
isc_sockaddr_format(from, fromtext, sizeof(fromtext));
|
||||
|
||||
TIME_NOW(&now);
|
||||
|
||||
if (query->lookup->stats && !short_form) {
|
||||
diff = isc_time_microdiff(&now, &query->time_sent);
|
||||
diff = isc_time_microdiff(&query->time_recv, &query->time_sent);
|
||||
if (use_usec)
|
||||
printf(";; Query time: %ld usec\n", (long) diff);
|
||||
else
|
||||
@@ -297,7 +294,7 @@ received(int bytes, isc_sockaddr_t *from, dig_query_t *query) {
|
||||
}
|
||||
puts("");
|
||||
} else if (query->lookup->identify && !short_form) {
|
||||
diff = isc_time_microdiff(&now, &query->time_sent);
|
||||
diff = isc_time_microdiff(&query->time_recv, &query->time_sent);
|
||||
if (use_usec)
|
||||
printf(";; Received %" ISC_PRINT_QUADFORMAT "u bytes "
|
||||
"from %s(%s) in %ld us\n\n",
|
||||
@@ -333,7 +330,6 @@ static isc_result_t
|
||||
say_message(dns_rdata_t *rdata, dig_query_t *query, isc_buffer_t *buf) {
|
||||
isc_result_t result;
|
||||
isc_uint64_t diff;
|
||||
isc_time_t now;
|
||||
char store[sizeof("12345678901234567890")];
|
||||
unsigned int styleflags = 0;
|
||||
|
||||
@@ -351,8 +347,7 @@ say_message(dns_rdata_t *rdata, dig_query_t *query, isc_buffer_t *buf) {
|
||||
return (result);
|
||||
check_result(result, "dns_rdata_totext");
|
||||
if (query->lookup->identify) {
|
||||
TIME_NOW(&now);
|
||||
diff = isc_time_microdiff(&now, &query->time_sent);
|
||||
diff = isc_time_microdiff(&query->time_recv, &query->time_sent);
|
||||
ADD_STRING(buf, " from server ");
|
||||
ADD_STRING(buf, query->servname);
|
||||
if (use_usec)
|
||||
|
@@ -3459,6 +3459,7 @@ recv_done(isc_task_t *task, isc_event_t *event) {
|
||||
INSIST(recvcount >= 0);
|
||||
|
||||
query = event->ev_arg;
|
||||
TIME_NOW(&query->time_recv);
|
||||
debug("lookup=%p, query=%p", query->lookup, query);
|
||||
|
||||
l = query->lookup;
|
||||
|
@@ -231,6 +231,7 @@ struct dig_query {
|
||||
ISC_LINK(dig_query_t) clink;
|
||||
isc_sockaddr_t sockaddr;
|
||||
isc_time_t time_sent;
|
||||
isc_time_t time_recv;
|
||||
isc_uint64_t byte_count;
|
||||
isc_buffer_t sendbuf;
|
||||
};
|
||||
|
Reference in New Issue
Block a user