summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2018-02-11 22:00:20 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2018-02-11 22:00:20 +0000
commit82593a3cc7aa1c55397ce07f32c1c99991e6339b (patch)
treeb590d946b186739980a6bbf565dd9fca8f2e3d42
parent991f7a496071f2d3cb8d770319afa2b0022e3860 (diff)
Ooops. After getting a NAK in response to a renewal REQUEST, we delete
the interface's address and thus the cached configuration data becomes invalid and must be discarded. Issue found & fix tested by Christer Solskogen. Thanks!
-rw-r--r--sbin/dhclient/dhclient.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c
index 608b4176763..df3118a6765 100644
--- a/sbin/dhclient/dhclient.c
+++ b/sbin/dhclient/dhclient.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dhclient.c,v 1.563 2018/02/11 04:16:58 krw Exp $ */
+/* $OpenBSD: dhclient.c,v 1.564 2018/02/11 22:00:19 krw Exp $ */
/*
* Copyright 2004 Henning Brauer <henning@openbsd.org>
@@ -932,6 +932,8 @@ dhcpnak(struct interface_info *ifi, const char *src)
free_client_lease(ifi->active);
ifi->active = NULL;
+ free(ifi->configured);
+ ifi->configured = NULL;
/* Stop sending DHCPREQUEST packets. */
cancel_timeout(ifi);