summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2020-12-27 20:39:38 +0000
committerRoy Marples <roy@marples.name>2020-12-27 20:39:38 +0000
commit440081797a4a01c9cede85e6733741285ee8b64f (patch)
tree870c0c32c6bad4b7e40b369fbf293c85e6d7ae30
parentd93d9b90e248e2e4f7a4c96f572cab41d04a0140 (diff)
downloaddhcpcd-440081797a4a01c9cede85e6733741285ee8b64f.tar.xz
NetBSD: Map IP Persistance to roaming
We can use IN_IFF_TENTATIVE for this.
-rw-r--r--src/if-bsd.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/if-bsd.c b/src/if-bsd.c
index 62e4a83c..96442310 100644
--- a/src/if-bsd.c
+++ b/src/if-bsd.c
@@ -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