]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Fix initial carrier status
authorRoy Marples <roy@marples.name>
Thu, 5 Sep 2013 13:27:52 +0000 (13:27 +0000)
committerRoy Marples <roy@marples.name>
Thu, 5 Sep 2013 13:27:52 +0000 (13:27 +0000)
dhcpcd.c

index ba5c51803f1322060a03bfc3bd1301d3637d18fd..8bddb4ca962feabb833a835b59a6012f59c6c31c 100644 (file)
--- a/dhcpcd.c
+++ b/dhcpcd.c
@@ -528,11 +528,11 @@ init_state(struct interface *ifp, int argc, char **argv)
 
        if (ifo->options & DHCPCD_LINK) {
                switch (carrier_status(ifp)) {
-               case 0:
+               case LINK_DOWN:
                        ifp->carrier = LINK_DOWN;
                        reason = "NOCARRIER";
                        break;
-               case 1:
+               case LINK_UP:
                        ifp->carrier = LINK_UP;
                        reason = "CARRIER";
                        break;