Ooops. After getting a NAK in response to a renewal REQUEST, we delete
authorkrw <krw@openbsd.org>
Sun, 11 Feb 2018 22:00:19 +0000 (22:00 +0000)
committerkrw <krw@openbsd.org>
Sun, 11 Feb 2018 22:00:19 +0000 (22:00 +0000)
the interface's address and thus the cached configuration data becomes
invalid and must be discarded.

Issue found & fix tested by Christer Solskogen. Thanks!

sbin/dhclient/dhclient.c

index 608b417..df3118a 100644 (file)
@@ -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);