]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Improve the waitip test.
authorRoy Marples <roy@marples.name>
Thu, 11 Sep 2014 13:29:56 +0000 (13:29 +0000)
committerRoy Marples <roy@marples.name>
Thu, 11 Sep 2014 13:29:56 +0000 (13:29 +0000)
dhcpcd.c

index 8dbebd7a4b08bd8f9a43b29d8bac0d8bbdbcb252..ece6507a4121610640acbdc8455dde2addb050bc 100644 (file)
--- a/dhcpcd.c
+++ b/dhcpcd.c
@@ -234,9 +234,8 @@ dhcpcd_ipwaited(struct dhcpcd_ctx *ctx)
            !ipv6nd_addrexists(ctx, NULL) &&
            !dhcp6_addrexists(ctx, NULL))
                return 0;
-       if ((ctx->options &
-           (DHCPCD_WAITIP | DHCPCD_WAITIP4 | DHCPCD_WAITIP6)) ==
-           (DHCPCD_WAITIP | DHCPCD_WAITIP4 | DHCPCD_WAITIP6) &&
+       if (ctx->options & DHCPCD_WAITIP &&
+           !(ctx->options & (DHCPCD_WAITIP4 | DHCPCD_WAITIP6)) &&
            !ipv4_addrexists(ctx, NULL) &&
            !ipv6nd_addrexists(ctx, NULL) &&
            !dhcp6_addrexists(ctx, NULL))