Skip to content

Commit

Permalink
Merge pull request #1234 from pi-hole/fix/DNSSEC_BOGUS_reply_time
Browse files Browse the repository at this point in the history
Compute reply time also for queries which failed upstream
  • Loading branch information
DL6ER authored Oct 27, 2021
2 parents 0ed94b2 + 3accb27 commit 60b056f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/dnsmasq_interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -2375,6 +2375,13 @@ static void FTL_upstream_error(const union all_addr *addr, const int id, const c
return;
}

// Save response time (if not done before)
// This is necessary to compute a reply time when there was an error
// upstream (e.g., DNSSEC BOGUS)
struct timeval response;
gettimeofday(&response, 0);
set_response_time(query, response);

// Translate dnsmasq's rcode into something we can use
const char *rcodestr = NULL;
switch(addr->log.rcode)
Expand Down

0 comments on commit 60b056f

Please sign in to comment.