From: Roy Marples Date: Wed, 22 Jan 2020 16:21:12 +0000 (+0000) Subject: DHCP: Take interface reference on Address Defend failure X-Git-Tag: v8.1.6~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8e830e72e3146491fe5cb0637f4a96226b1ac1f1;p=thirdparty%2Fdhcpcd.git DHCP: Take interface reference on Address Defend failure As the astate could be freed on dropping the DHCP state. --- diff --git a/src/dhcp.c b/src/dhcp.c index ccd39b99..b9757be0 100644 --- a/src/dhcp.c +++ b/src/dhcp.c @@ -2335,9 +2335,10 @@ dhcp_message_new(struct bootp **bootp, static void dhcp_arp_defend_failed(struct arp_state *astate) { + struct interface *ifp = astate->iface; - dhcp_drop(astate->iface, "EXPIRED"); - dhcp_start1(astate->iface); + dhcp_drop(ifp, "EXPIRED"); + dhcp_start1(ifp); } #endif