]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Try and fix bringing up virtual interfaces on BSD
authorRoy Marples <roy@marples.name>
Sun, 18 Aug 2013 15:35:40 +0000 (15:35 +0000)
committerRoy Marples <roy@marples.name>
Sun, 18 Aug 2013 15:35:40 +0000 (15:35 +0000)
net.c

diff --git a/net.c b/net.c
index 23cb248276189c2dff10cba2af618d6b9192691a..92a9b18cb862c2366563b136516b77675e5bb37a 100644 (file)
--- a/net.c
+++ b/net.c
@@ -167,7 +167,7 @@ carrier_status(struct interface *iface)
 #endif
 
        if (ioctl(socket_afnet, SIOCGIFFLAGS, &ifr) == -1)
-               return -1;
+               return LINK_UNKNOWN;
        iface->flags = ifr.ifr_flags;
 
        ret = LINK_UNKNOWN;
@@ -315,7 +315,7 @@ discover_interfaces(int argc, char * const *argv)
                /* Bring the interface up if not already */
                if (!(ifp->flags & IFF_UP)
 #ifdef SIOCGIFMEDIA
-                   && carrier_status(ifp) != -1
+                   && carrier_status(ifp) != LINK_UNKNOWN
 #endif
                   )
                {