From 4083f3dc750a2f3f0add21544e7454c6697ba49e Mon Sep 17 00:00:00 2001 From: florian Date: Tue, 16 Mar 2021 17:40:28 +0000 Subject: [PATCH] Don't (try to) deconfigure an interface that was never configured. --- sbin/dhcpleased/engine.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sbin/dhcpleased/engine.c b/sbin/dhcpleased/engine.c index fbe7a78780f..7fda133d37b 100644 --- a/sbin/dhcpleased/engine.c +++ b/sbin/dhcpleased/engine.c @@ -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 @@ -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; -- 2.20.1