diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2017-06-21 16:39:06 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2017-06-21 16:39:06 +0000 |
commit | 0da410400f6d43b8ea4c7c66b22a09c59df083a8 (patch) | |
tree | 0ab8840f031f09eb0ead2dd1cbd2931893dd6e64 | |
parent | 7970799645e8b35ff18e98922587fd47ab017875 (diff) |
Teach get_recorded_lease() that static leases do not
expire.
-rw-r--r-- | sbin/dhclient/dhclient.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c index d025cf043e9..0201bfe25b4 100644 --- a/sbin/dhclient/dhclient.c +++ b/sbin/dhclient/dhclient.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhclient.c,v 1.442 2017/06/21 15:49:27 krw Exp $ */ +/* $OpenBSD: dhclient.c,v 1.443 2017/06/21 16:39:05 krw Exp $ */ /* * Copyright 2004 Henning Brauer <henning@openbsd.org> @@ -2580,7 +2580,7 @@ get_recorded_lease(struct interface_info *ifi) if (addressinuse(ifi, lp->address, ifname) && strncmp(ifname, ifi->name, IF_NAMESIZE) != 0) continue; - else if (lp->expiry <= cur_time) + if (lp->is_static == 0 && lp->expiry <= cur_time) continue; if (lp->is_static) |