go-ping / ping

ICMP Ping library for Go
MIT License
1.31k stars 344 forks source link

TTL not return as expected (From a network point of view) #192

Closed werbes closed 1 year ago

werbes commented 2 years ago

Hi - I think I have found a minor issue for must users of go-ping. It seems when using pinger.ttl = 1 it return with pinger.Statistics.Addr equal to the original destination insted of the router returning the TTL exceeded - in case of TTL = 1 it should be your first gateway that decrement the ttl.