diff options
| author | Roy Marples <roy@marples.name> | 2019-09-06 12:52:22 +0100 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2019-09-06 12:52:22 +0100 |
| commit | d68b260c745008426e8411121325b6cf4d038ddd (patch) | |
| tree | d3b3c4db965bb6826a60a1c5d9efd8b9329d19a4 /src/dhcpcd.c | |
| parent | 09420acecb6b4cf4c687c796ef72c7e61793f53a (diff) | |
| download | dhcpcd-d68b260c745008426e8411121325b6cf4d038ddd.tar.xz | |
DHCP: If root fs is network mounted, enable last lease extend
We don't want expiry to unmount the root FS.
Also, we don't want a reboot with an expired lease to kill
our current assignment either.
Only works on NetBSD right now.
Diffstat (limited to 'src/dhcpcd.c')
| -rw-r--r-- | src/dhcpcd.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/dhcpcd.c b/src/dhcpcd.c index 6d361e49..f944d9e6 100644 --- a/src/dhcpcd.c +++ b/src/dhcpcd.c @@ -590,6 +590,12 @@ configure_interface1(struct interface *ifp) } } #endif + + /* If root is network mounted, we don't want to kill the connection + * if the DHCP server goes the way of the dodo OR dhcpcd is rebooting + * and the lease file has expired. */ + if (is_root_local() == 0) + ifo->options |= DHCPCD_LASTLEASE_EXTEND; } int |
