PING_DEF_TIMEOUT used to be used instead of PING_OPT_TTL as option
argument of ping_setopt(). This caused really strange effects when pinging
hosts, like a failed assertion in ping_timeval_sub() in liboping
indicating a latency <= 0.
Thanks to Romain Francoise for pointing this out and a lot of helpful
debugging information.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
else if (strcasecmp (key, "ttl") == 0)
{
int ttl = atoi (value);
- if (ping_setopt (pingobj, PING_DEF_TIMEOUT, (void *) &ttl))
+ if (ping_setopt (pingobj, PING_OPT_TTL, (void *) &ttl))
{
WARNING ("ping: liboping did not accept the TTL value %i", ttl);
return (1);