changeset 5520:4cdb6a13f1b7 draft

BSD: LINK_UNKNOWN is traditionally treated as LINK_UP
author Roy Marples <roy@marples.name>
date Fri, 16 Oct 2020 14:36:34 +0100
parents a5c61a48ae3c
children 4396ae1267a0
files src/if.c
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/if.c	Thu Oct 15 17:59:33 2020 +0100
+++ b/src/if.c	Fri Oct 16 14:36:34 2020 +0100
@@ -198,10 +198,8 @@
 {
 
 	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