From: David Schweikert Date: Mon, 22 Dec 2025 21:33:53 +0000 (+0100) Subject: Fix measurement of time for timed reports (-Q) to start after DNS name resolution. X-Git-Tag: v5.5~17 X-Git-Url: https://git.gsnw.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b3de7e4bf350f79d93018a6c637d65840cb69494;p=fping.git Fix measurement of time for timed reports (-Q) to start after DNS name resolution. --- diff --git a/CHANGELOG.md b/CHANGELOG.md index e286510..3437ae9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -38,6 +38,8 @@ fping 5.5-rc1 (2025-12-21) - Fix debug build use of dbg_printf in fping.c (#415, thanks @auerswal) - Remove MacOS-specific test for -I option (#407) - GitHub Actions fixes (thanks @gsnw-sebast) +- Fix measurement of time for timed reports (-Q) to start after DNS name + resolution. fping 5.4 (2025-04-19) ====================== diff --git a/src/fping.c b/src/fping.c index bb97ddb..5ca1ec9 100644 --- a/src/fping.c +++ b/src/fping.c @@ -1434,6 +1434,10 @@ int main(int argc, char **argv) #endif setlinebuf(stdout); + // Last time we updated current_time_ns was before adding the hosts and + // possibly doing DNS resolution, which means that it isn't accurate + // anymore. + update_current_time(); if (report_interval) { next_report_time = current_time_ns + report_interval; }