]> git.ipfire.org Git - thirdparty/mtr.git/commitdiff
fix numhosts calculation. Improve -D (--due-ttl) option 548/head
authordvallyanov <105429224+dvallyanov@users.noreply.github.com>
Fri, 26 Sep 2025 09:04:20 +0000 (12:04 +0300)
committerGitHub <noreply@github.com>
Fri, 26 Sep 2025 09:04:20 +0000 (12:04 +0300)
ui/net.c

index f0356e01bab24c71e61444624910d91536c32911..ed71a5623ce048ee1c33fdd34964c819f7cef92b 100644 (file)
--- 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;