]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Don't discard expired leases when dumping.
authorRoy Marples <roy@marples.name>
Wed, 24 Sep 2014 09:49:09 +0000 (09:49 +0000)
committerRoy Marples <roy@marples.name>
Wed, 24 Sep 2014 09:49:09 +0000 (09:49 +0000)
dhcp6.c

diff --git a/dhcp6.c b/dhcp6.c
index 7b235feafcfd0cc78b7cf579ef6ef5e028771aee..7461ee9a4d358e5b2a864287884c042c3d8841f7 100644 (file)
--- a/dhcp6.c
+++ b/dhcp6.c
@@ -2058,7 +2058,9 @@ dhcp6_readlease(struct interface *ifp)
        if (fd == -1)
                goto ex;
 
-       if (state->expire != ND6_INFINITE_LIFETIME) {
+       if (!(ifp->options->options & DHCPCD_DUMPLEASE) &&
+           state->expire != ND6_INFINITE_LIFETIME)
+       {
                gettimeofday(&now, NULL);
                if ((time_t)state->expire < now.tv_sec - st.st_mtime) {
                        syslog(LOG_DEBUG,"%s: discarding expired lease",