summaryrefslogtreecommitdiff
path: root/sbin/dhclient
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2017-11-12 11:18:51 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2017-11-12 11:18:51 +0000
commitcf60d71f106bee325ba90eb84e06aec7cf6e2035 (patch)
tree98475ca046a78f15e2ad326b3ce8d25def2da707 /sbin/dhclient
parent4ee58763a961112fcf6fc93ce2c8b61a8ca65893 (diff)
Clone epoch value in clone_lease(), not manually.
Diffstat (limited to 'sbin/dhclient')
-rw-r--r--sbin/dhclient/dhclient.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c
index b74cacf84ff..9b6aa648bf9 100644
--- a/sbin/dhclient/dhclient.c
+++ b/sbin/dhclient/dhclient.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dhclient.c,v 1.521 2017/11/09 12:34:25 krw Exp $ */
+/* $OpenBSD: dhclient.c,v 1.522 2017/11/12 11:18:50 krw Exp $ */
/*
* Copyright 2004 Henning Brauer <henning@openbsd.org>
@@ -2254,8 +2254,6 @@ apply_defaults(struct client_lease *lease)
if (newlease == NULL)
fatalx("unable to clone lease");
- newlease->epoch = lease->epoch;
-
if (config->filename != NULL) {
free(newlease->filename);
newlease->filename = strdup(config->filename);
@@ -2386,6 +2384,7 @@ clone_lease(struct client_lease *oldlease)
if (newlease == NULL)
goto cleanup;
+ newlease->epoch = oldlease->epoch;
newlease->expiry = oldlease->expiry;
newlease->renewal = oldlease->renewal;
newlease->rebind = oldlease->rebind;