]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
NetBSD: Map IP Persistance to roaming
authorRoy Marples <roy@marples.name>
Sun, 27 Dec 2020 20:39:38 +0000 (20:39 +0000)
committerRoy Marples <roy@marples.name>
Sun, 27 Dec 2020 20:39:38 +0000 (20:39 +0000)
We can use IN_IFF_TENTATIVE for this.

src/if-bsd.c

index 62e4a83c98ec9fa6e2e4de4ed20249b43e265a8e..96442310cf22af67d96f6270234d56481751c7ca 100644 (file)
@@ -411,10 +411,15 @@ if_carrier(struct interface *ifp, const void *ifadata)
 }
 
 bool
-if_roaming(__unused struct interface *ifp)
+if_roaming(struct interface *ifp)
 {
 
+#ifdef IN_IFF_TENTATIVE
+       return ifp->flags & IFF_UP && ifp->carrier == LINK_DOWN;
+#else
+       UNUSED(ifp);
        return false;
+#endif
 }
 
 static void