Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS import: src/external/bsd/dhcpcd/dist



Hi Ryo

On 15/10/2020 02:23, Ryo ONODERA wrote:
dhcpcd-9.3.1 do not detect carrier with cdce(4) and urndis(4) devices.
dhcpcd-9.2.0 from pkgsrc-2020Q3 branch works without problems.
(Maybe 9.3.0 in NetBSD base worked for me.)

cdce and urndis have no "status" line in ifconfig command output.
Is this related to my problem?

Does this fix it?

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


Home | Main Index | Thread Index | Old Index