]> 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:21:12 +0000 (16:21 +0000)
As the astate could be freed on dropping the DHCP state.

src/dhcp.c

index ccd39b996ef19b2c4cb01a1889643a58c44e44bc..b9757be0affce9fe0bdc9a38918492e2f9bfe5f5 100644 (file)
@@ -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