go-ping / ping

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

Report whether or not the TTL value was read #205

Closed mem closed 2 years ago

mem commented 2 years ago

In IPv6 a hop limit of 0 is valid, so the TTL the code is reporting is actually a valid value in that case.

Initialize ttl to -1, so that in the case of not getting a TTL value from the control message, we can let the rest of the code whether the reported value was actually 0 or whether it couldn't be read.

Signed-off-by: Marcelo E. Magallon marcelo.magallon@grafana.com

SuperQ commented 2 years ago

It looks like we need to fix the goreleaser setup.

mem commented 2 years ago

It looks like we need to fix the goreleaser setup.

https://github.com/go-ping/ping/pull/210