Don't (try to) deconfigure an interface that was never configured.
authorflorian <florian@openbsd.org>
Tue, 16 Mar 2021 17:40:28 +0000 (17:40 +0000)
committerflorian <florian@openbsd.org>
Tue, 16 Mar 2021 17:40:28 +0000 (17:40 +0000)
sbin/dhcpleased/engine.c

index fbe7a78..7fda133 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: engine.c,v 1.9 2021/03/07 18:39:11 florian Exp $      */
+/*     $OpenBSD: engine.c,v 1.10 2021/03/16 17:40:28 florian Exp $     */
 
 /*
  * Copyright (c) 2017, 2021 Florian Obser <florian@openbsd.org>
@@ -1268,6 +1268,9 @@ send_deconfigure_interface(struct dhcpleased_iface *iface)
 {
        struct imsg_configure_interface  imsg;
 
+       if (iface->requested_ip.s_addr == INADDR_ANY)
+               return;
+
        log_lease(iface, 1);
 
        imsg.if_index = iface->if_index;