]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
sun: Don't report error if interface does not exist during preinit
authorRoy Marples <roy@marples.name>
Sun, 14 Apr 2019 09:53:25 +0000 (12:53 +0300)
committerRoy Marples <roy@marples.name>
Sun, 14 Apr 2019 09:53:25 +0000 (12:53 +0300)
For sun this is normal as we only create the initial interface
when adding an address.

src/dhcpcd.c

index 384107a80c283d1d1009909f9d4f55ee8be86abd..fa5d5d597292e117b3db77047c2a294db5dcdd25 100644 (file)
@@ -979,7 +979,12 @@ dhcpcd_prestartinterface(void *arg)
 
        if ((!(ifp->ctx->options & DHCPCD_MASTER) ||
            ifp->options->options & DHCPCD_IF_UP) &&
-           if_up(ifp) == -1)
+           if_up(ifp) == -1
+#ifdef __sun
+           /* Interface could not yet be plumbed. */
+           && errno != ENXIO
+#endif
+           )
                logerr("%s: %s", __func__, ifp->name);
 
        if (ifp->options->options & DHCPCD_LINK &&