]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Only start discovery on lease expiration if we have a carrier.
authorRoy Marples <roy@marples.name>
Tue, 4 Jul 2017 11:22:56 +0000 (12:22 +0100)
committerRoy Marples <roy@marples.name>
Tue, 4 Jul 2017 11:22:56 +0000 (12:22 +0100)
src/dhcp.c

index be3d354aa68b6f3b3f1d250fe21c10bb179d49d5..5b808799498150b3fb54a60ad023daab5d35c4cf 100644 (file)
@@ -1915,7 +1915,8 @@ dhcp_expire1(struct interface *ifp)
        dhcp_drop(ifp, "EXPIRE");
        unlink(state->leasefile);
        state->interval = 0;
-       dhcp_discover(ifp);
+       if (!(ifp->options->options & DHCPCD_LINK) || ifp->carrier != LINK_DOWN)
+               dhcp_discover(ifp);
 
 }
 static void