From b8542489b697f93b2f7590361cde856ad4d610cc Mon Sep 17 00:00:00 2001 From: Leo Date: Wed, 18 Jan 2023 13:19:27 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=BD=BF=E7=94=A8=20-?= =?UTF-8?q?f=20=E5=AF=BC=E8=87=B4=E6=89=93=E5=8D=B0=E5=8D=A1=E4=BD=8F?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- trace/icmp_ipv4.go | 2 +- trace/icmp_ipv6.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/trace/icmp_ipv4.go b/trace/icmp_ipv4.go index 5d7ddd2..3e2a8cb 100644 --- a/trace/icmp_ipv4.go +++ b/trace/icmp_ipv4.go @@ -30,7 +30,7 @@ type ICMPTracer struct { func (t *ICMPTracer) PrintFunc() { defer t.wg.Done() - var ttl = 0 + var ttl = t.Config.BeginHop - 1 for { if t.AsyncPrinter != nil { t.AsyncPrinter(&t.res) diff --git a/trace/icmp_ipv6.go b/trace/icmp_ipv6.go index 5b1b851..293f006 100644 --- a/trace/icmp_ipv6.go +++ b/trace/icmp_ipv6.go @@ -29,7 +29,7 @@ type ICMPTracerv6 struct { func (t *ICMPTracerv6) PrintFunc() { // defer t.wg.Done() - var ttl = 0 + var ttl = t.Config.BeginHop - 1 for { if t.RealtimePrinter != nil { // 接收的时候检查一下是不是 3 跳都齐了