summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2020-01-22 16:21:12 +0000
committerRoy Marples <roy@marples.name>2020-01-22 16:21:12 +0000
commit8e830e72e3146491fe5cb0637f4a96226b1ac1f1 (patch)
tree1ae14bdcfefde2d42d815c5246b2d0ba38d9ad4d
parente0c9e46ec5df2f99a11900855b72b13e76069861 (diff)
downloaddhcpcd-8e830e72e3146491fe5cb0637f4a96226b1ac1f1.tar.xz
DHCP: Take interface reference on Address Defend failure
As the astate could be freed on dropping the DHCP state.
-rw-r--r--src/dhcp.c5
1 files changed, 3 insertions, 2 deletions
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