* Preserve the network state until we either disconnect
* or re-connect.
*/
- if (if_roaming(ifp)) {
- dhcpcd_nocarrier_roaming(ifp);
- return;
- }
-
-#ifdef NOCARRIER_PRESERVE_IP
- if (ifp->flags & IFF_UP &&
- !(ifp->options->options & DHCPCD_ANONYMOUS))
+ if (!(ifp->options->options & DHCPCD_ANONYMOUS) &&
+ if_roaming(ifp))
{
- /* This OS supports the roaming concept on any
- * interface. */
dhcpcd_nocarrier_roaming(ifp);
return;
}
-#endif
loginfox("%s: carrier lost", ifp->name);
script_runreason(ifp, "NOCARRIER");
* dhcpcd can poll it for the relevant flags periodically */
#define IF_POLL_UP 100 /* milliseconds */
-/* Some systems have in-built IPv4 DAD.
- * However, we need them to do DAD at carrier up as well. */
-#ifdef IN_IFF_TENTATIVE
-# ifdef __NetBSD__
-# define NOCARRIER_PRESERVE_IP
-# endif
-#endif
-
/*
* Systems which handle 1 address per alias.
* Currenly this is just Solaris.