修正udp mode不应用起始hop参数设置的问题

This commit is contained in:
tsosunchia
2024-06-27 12:23:00 +08:00
parent 486cdfdc03
commit ade34e964a

View File

@@ -54,7 +54,7 @@ func (t *UDPTracer) Execute() (*Result, error) {
go t.listenICMP()
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