]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Don't set if_up or if_down as true when testing.
authorRoy Marples <roy@marples.name>
Wed, 18 Jul 2012 08:35:07 +0000 (08:35 +0000)
committerRoy Marples <roy@marples.name>
Wed, 18 Jul 2012 08:35:07 +0000 (08:35 +0000)
configure.c

index 15747fdd1d7f8e6cfd54a8217d1b9589ef1ddaaf..d8aefd772bb6c7d6b3de1e7948e3fb131f7b292e 100644 (file)
@@ -216,7 +216,10 @@ make_env(const struct interface *iface, const char *reason, char ***argv)
                e--;
        }
        *--p = '\0';
-       if ((dhcp && iface->state->new) || (ra && ipv6rs_has_ra(iface))) {
+       if (strcmp(reason, "TEST") == 0) {
+               env[8] = strdup("if_up=false");
+               env[9] = strdup("if_down=false");
+       } else if ((dhcp && iface->state->new) || (ra && ipv6rs_has_ra(iface))){
                env[8] = strdup("if_up=true");
                env[9] = strdup("if_down=false");
        } else {