]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
DHCP: Take interface reference on Address Defend failure
authorRoy Marples <roy@marples.name>
Wed, 22 Jan 2020 16:21:12 +0000 (16:21 +0000)
committerRoy Marples <roy@marples.name>
Wed, 22 Jan 2020 16:22:52 +0000 (16:22 +0000)
As the astate could be freed on dropping the DHCP state.

src/dhcp.c

index 54de9f7291d881ba61c9447cb3001bed557fb5f2..0319301b0ea5b02b1ef853dfdab184a7e441ddf6 100644 (file)
@@ -2389,9 +2389,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