src/liboping.c: When setting the TTL, update all existing pinghost_t, too.
authorFlorian Forster <octo@leeloo.lan.home.verplant.org>
Sun, 15 Mar 2009 10:41:20 +0000 (11:41 +0100)
committerFlorian Forster <octo@leeloo.lan.home.verplant.org>
Sun, 15 Mar 2009 10:41:20 +0000 (11:41 +0100)
src/liboping.c

index 65b2ef5..4f7d955 100644 (file)
@@ -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: