From 0b8f964038a9f8dc4345a2d73115567216e6e202 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Sun, 15 Mar 2009 11:41:20 +0100 Subject: [PATCH] src/liboping.c: When setting the TTL, update all existing pinghost_t, too. --- src/liboping.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/liboping.c b/src/liboping.c index 65b2ef5..4f7d955 100644 --- a/src/liboping.c +++ b/src/liboping.c @@ -1041,6 +1041,13 @@ int ping_setopt (pingobj_t *obj, int option, void *value) obj->ttl = PING_DEF_TTL; ret = -1; } + else + { + pinghost_t *ph; + + for (ph = obj->head; ph != NULL; ph = ph->next) + ping_set_ttl (ph, obj->ttl); + } break; case PING_OPT_AF: -- 2.30.2