]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Don't check link state if not instruted to before working out if we can
authorRoy Marples <roy@marples.name>
Mon, 26 Oct 2015 15:55:10 +0000 (15:55 +0000)
committerRoy Marples <roy@marples.name>
Mon, 26 Oct 2015 15:55:10 +0000 (15:55 +0000)
fork early or not.
Fixes [74061fd3d3].

dhcpcd.c

index 81edd79d4fdc6d5e5710179daac8ec0fd4590a0c..ed47240e31cf3e2efee3e8f716dd45a441e9634b 100644 (file)
--- a/dhcpcd.c
+++ b/dhcpcd.c
@@ -1823,7 +1823,8 @@ main(int argc, char **argv)
        opt = 0;
        TAILQ_FOREACH(ifp, ctx.ifaces, next) {
                run_preinit(ifp);
-               if (ifp->carrier != LINK_DOWN)
+               if (!(ifp->options->options & DHCPCD_LINK) ||
+                   ifp->carrier != LINK_DOWN)
                        opt = 1;
        }