{
logger(LOG_ERR, "lease expired %u seconds ago",
offset + lease->leasetime);
- goto eexit;
+ /* Persistent interfaces should still try and use the lease
+ * if we can't contact a DHCP server. We just set the timeout
+ * to 1 second. */
+ if (state->options & DHCPCD_PERSISTENT)
+ offset = lease->renewaltime - 1;
+ else
+ goto eexit;
}
if (lease->leasedfrom == 0)
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd May 21, 2008
+.Dd May 28, 2008
.Dt DHCPCD 8 SMM
.Sh NAME
.Nm dhcpcd
.It Fl E , -lastlease
If
.Nm
-cannot obtain a lease, then try to use the last lease we got for the
-interface if it hasn't yet expired.
+cannot obtain a lease, then try to use the last lease we got for the interface.
+If the
+.Fl p, -persistent
+option is not given then we only use the lease if it hasn't expired.
.It Fl F , -fqdn Ar fqdn
Requests that the DHCP server updates DNS using FQDN instead of just a
hostname.