mirror of
https://github.com/openwrt/openwrt.git
synced 2026-07-17 16:41:56 +04:00
b8175a021b
Add a proto_dhcp_restart() handler that re-acquires the DHCP lease via a single ubus call, releasing the previous lease and triggering a fresh DHCPDISCOVER without bouncing the interface. The re-acquire is implemented by sending SIGHUP to udhcpc, which releases the current lease (if any) and immediately transitions the state machine to INIT_SELECTING so the next main-loop iteration sends a fresh DHCPDISCOVER. A single signal thus expresses 'release this lease and get a new one' without exiting the client, so upstream watchdogs (e.g. a DNS-health monitor) can request a clean re-lease without tearing down the interface. Signed-off-by: John Crispin <john@phrozen.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>