From 7de07e68b6ab71cc9741526a589050c1ad38e87c Mon Sep 17 00:00:00 2001 From: krw Date: Wed, 21 Jun 2017 16:39:05 +0000 Subject: [PATCH] Teach get_recorded_lease() that static leases do not expire. --- sbin/dhclient/dhclient.c | 4 ++-- 1 file 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 @@ -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) -- 2.20.1