Mercurial > hg > dhcpcd
diff src/dhcpcd.c @ 5570:f32e37b1d371 draft
dhcpcd: Don't roam when anonymous is set
We can now remove the NOCARRIER_PRESERVE_IP define.
| author | Roy Marples <roy@marples.name> |
|---|---|
| date | Sun, 27 Dec 2020 21:59:32 +0000 |
| parents | cebc093fd611 |
| children | 2a519da0f1a2 |
line wrap: on
line diff
--- a/src/dhcpcd.c Sun Dec 27 20:39:38 2020 +0000 +++ b/src/dhcpcd.c Sun Dec 27 21:59:32 2020 +0000 @@ -734,22 +734,13 @@ * Preserve the network state until we either disconnect * or re-connect. */ - if (if_roaming(ifp)) { + if (!(ifp->options->options & DHCPCD_ANONYMOUS) && + if_roaming(ifp)) + { dhcpcd_nocarrier_roaming(ifp); return; } -#ifdef NOCARRIER_PRESERVE_IP - if (ifp->flags & IFF_UP && - !(ifp->options->options & DHCPCD_ANONYMOUS)) - { - /* 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_drop(ifp, 0);
