From: Roy Marples Date: Fri, 16 Oct 2020 13:36:34 +0000 (+0100) Subject: BSD: LINK_UNKNOWN is traditionally treated as LINK_UP X-Git-Tag: v9.3.2~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3db40d00c4bd5853be00b1b00193e3b3c34adec6;p=thirdparty%2Fdhcpcd.git BSD: LINK_UNKNOWN is traditionally treated as LINK_UP --- diff --git a/src/if.c b/src/if.c index 5f4edb86..deb5280b 100644 --- a/src/if.c +++ b/src/if.c @@ -198,10 +198,8 @@ if_is_link_up(const struct interface *ifp) { return ifp->flags & IFF_UP && - (ifp->carrier == LINK_UP || - (ifp->carrier == LINK_UNKNOWN && - !(ifp->options == NULL || - ifp->options->options & DHCPCD_LINK))); + (ifp->carrier != LINK_DOWN || + (ifp->options != NULL && !(ifp->options->options & DHCPCD_LINK))); } int