From f91cd5dc6d1deefb404f346e5b3d167865428f76 Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Sun, 24 Feb 2008 18:25:14 +0100 Subject: [PATCH] ping plugin: Fixed a typo when setting the TTL. 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 Signed-off-by: Florian Forster --- src/ping.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ping.c b/src/ping.c index 05f660b3..2f7c064d 100644 --- a/src/ping.c +++ b/src/ping.c @@ -162,7 +162,7 @@ static int ping_config (const char *key, const char *value) 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); -- 2.11.0