summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2020-10-16 14:36:34 +0100
committerRoy Marples <roy@marples.name>2020-10-16 14:36:34 +0100
commit3db40d00c4bd5853be00b1b00193e3b3c34adec6 (patch)
tree47900cf5d87a2a61704e30826d3be975a3b23890
parent2a5ca0e317b4a1044c4774f8508a279ea1711933 (diff)
downloaddhcpcd-3db40d00c4bd5853be00b1b00193e3b3c34adec6.tar.xz
BSD: LINK_UNKNOWN is traditionally treated as LINK_UP
-rw-r--r--src/if.c6
1 files changed, 2 insertions, 4 deletions
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