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 <[email protected]>
---
 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

_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to