From: krw Date: Wed, 21 Jun 2017 16:39:05 +0000 (+0000) Subject: Teach get_recorded_lease() that static leases do not X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=7de07e68b6ab71cc9741526a589050c1ad38e87c;p=openbsd Teach get_recorded_lease() that static leases do not expire. --- 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 @@ -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)