From: dvallyanov <105429224+dvallyanov@users.noreply.github.com> Date: Fri, 26 Sep 2025 09:04:20 +0000 (+0300) Subject: fix numhosts calculation. Improve -D (--due-ttl) option X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F548%2Fhead;p=thirdparty%2Fmtr.git fix numhosts calculation. Improve -D (--due-ttl) option --- diff --git a/ui/net.c b/ui/net.c index f0356e0..ed71a56 100644 --- a/ui/net.c +++ b/ui/net.c @@ -612,7 +612,7 @@ int net_send_batch( if ( /* success in reaching target */ (host_addr_cmp(batch_at, remoteaddress, ctl->af) == 0 && ctl->dueTTL <= (batch_at + 1)) || /* fail in consecutive maxUnknown (firewall?) */ - (n_unknown > ctl->maxUnknown && ctl->dueTTL >= (batch_at + 1)) || + (n_unknown > ctl->maxUnknown && ctl->dueTTL <= (batch_at + 1)) || /* or reach limit */ (batch_at >= ctl->maxTTL - 1)) { restart = 1;