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
commit8e3bd39b247a9b8ecef37ec0bd455318a4e43e7a (patch)
tree870c0c32c6bad4b7e40b369fbf293c85e6d7ae30
parent28171af184ef71bc298dc8c4ba9b30d69ebe2e2b (diff)
downloaddhcpcd-8e3bd39b247a9b8ecef37ec0bd455318a4e43e7a.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