mirror of
https://github.com/cloudflare/cloudflared.git
synced 2025-07-27 22:39:57 +00:00
TUN-8762: fix argument order when invoking tracert and modify network info output parsing.
## Summary The windows code path has three bugs: * the -4 and -6 option cannot be passed in the last position * since there are some lines in the command output that are not parsable the collection fails to parse any kind of output * the timeout hop is not correctly parsed This PR also guards the parsing code against empty domains Closes TUN-8762
This commit is contained in:
@@ -68,7 +68,11 @@ func DecodeLine(text string) (*Hop, error) {
|
||||
rtts = append(rtts, time.Duration(rtt*MicrosecondsFactor))
|
||||
}
|
||||
}
|
||||
|
||||
domain, _ = strings.CutSuffix(domain, " ")
|
||||
if domain == "" {
|
||||
return nil, ErrEmptyDomain
|
||||
}
|
||||
|
||||
return NewHop(uint8(index), domain, rtts), nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user