Code

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 65b2ef529dd81cff07b7948f2d8f47eeb76e76c1..4f7d955a6ad5baab241f46f12d636b0c7df22244 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: