summaryrefslogtreecommitdiffstats
path: root/src/dhcpcd.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2020-12-27 21:59:32 +0000
committerRoy Marples <roy@marples.name>2020-12-27 21:59:32 +0000
commitbb5de1714ecfb21d63936c22bc4602c8827d2e7c (patch)
treee4d4cdf3c7cb3aa88919306640718ab95e3b9844 /src/dhcpcd.c
parent440081797a4a01c9cede85e6733741285ee8b64f (diff)
downloaddhcpcd-bb5de1714ecfb21d63936c22bc4602c8827d2e7c.tar.xz
dhcpcd: Don't roam when anonymous is set
We can now remove the NOCARRIER_PRESERVE_IP define.
Diffstat (limited to 'src/dhcpcd.c')
-rw-r--r--src/dhcpcd.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/dhcpcd.c b/src/dhcpcd.c
index 42882c2c..13480b48 100644
--- a/src/dhcpcd.c
+++ b/src/dhcpcd.c
@@ -734,21 +734,12 @@ dhcpcd_handlecarrier(struct interface *ifp, int carrier, unsigned int flags)
* 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");