From 190b3ab94e2e0cfb2e9216e23afe5426e876aba4 Mon Sep 17 00:00:00 2001 From: Leo Date: Fri, 9 Jun 2023 21:32:56 +0800 Subject: [PATCH] chore: add begin hop / srcaddr listen --- trace/tcp_ipv6.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/trace/tcp_ipv6.go b/trace/tcp_ipv6.go index 925b2cb..1f1e44d 100644 --- a/trace/tcp_ipv6.go +++ b/trace/tcp_ipv6.go @@ -46,7 +46,7 @@ func (t *TCPTracerv6) Execute() (*Result, error) { if err != nil { return nil, err } - t.icmp, err = icmp.ListenPacket("ip6:58", "::") + t.icmp, err = icmp.ListenPacket("ip6:58", t.SrcAddr) if err != nil { return &t.res, err } @@ -63,7 +63,7 @@ func (t *TCPTracerv6) Execute() (*Result, error) { t.sem = semaphore.NewWeighted(int64(t.ParallelRequests)) - for ttl := 1; ttl <= t.MaxHops; ttl++ { + for ttl := t.BeginHop; ttl <= t.MaxHops; ttl++ { // 如果到达最终跳,则退出 if t.final != -1 && ttl > t.final { break