[PATCH] udhcpc: perform_release(): Unconditionally call deconfig script
Peter Korsgaard
peter at korsgaard.com
Wed Aug 24 10:08:16 UTC 2016
The udhcpc script may be used to setup fallback configuration (E.G. IPv4LL,
fixed IP address, ..) that also needs to be cleaned up on release (E.G.
when SIGUSR2 is called or on shutdown with -R), so unconditionally call
deconfig.
Signed-off-by: Peter Korsgaard <peter at korsgaard.com>
---
networking/udhcp/dhcpc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c
index 8a16e98..799a7f9 100644
--- a/networking/udhcp/dhcpc.c
+++ b/networking/udhcp/dhcpc.c
@@ -1129,9 +1129,9 @@ static void perform_release(uint32_t server_addr, uint32_t requested_ip)
bb_error_msg("unicasting a release of %s to %s",
inet_ntoa(temp_addr), buffer);
send_release(server_addr, requested_ip); /* unicast */
- udhcp_run_script(NULL, "deconfig");
}
bb_error_msg("entering released state");
+ udhcp_run_script(NULL, "deconfig");
change_listen_mode(LISTEN_NONE);
state = RELEASED;
--
2.8.1
More information about the busybox
mailing list