[git commit] udhcpc: run "deconfig" script in manual renew state too. closes 9061
Denys Vlasenko
vda.linux at googlemail.com
Sun Jul 3 18:26:44 UTC 2016
commit: https://git.busybox.net/busybox/commit/?id=44399e00ffa73270cd7fc108c983d3b1705b9d86
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master
The bug was seen when the following is done:
# killall 1 udhpc; killall 2 udhpc
Performing a DHCP renew
state: 2 -> 5
Sending renew...
Entering released state
state: 5 -> 6 <<<<<<<<<<<<<< not calling script!!!!
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
networking/udhcp/d6_dhcpc.c | 6 +++++-
networking/udhcp/dhcpc.c | 6 +++++-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/networking/udhcp/d6_dhcpc.c b/networking/udhcp/d6_dhcpc.c
index c77669a..12f8f11 100644
--- a/networking/udhcp/d6_dhcpc.c
+++ b/networking/udhcp/d6_dhcpc.c
@@ -793,7 +793,11 @@ static void perform_renew(void)
static void perform_d6_release(struct in6_addr *server_ipv6, struct in6_addr *our_cur_ipv6)
{
/* send release packet */
- if (state == BOUND || state == RENEWING || state == REBINDING) {
+ if (state == BOUND
+ || state == RENEWING
+ || state == REBINDING
+ || state == RENEW_REQUESTED
+ ) {
bb_error_msg("unicasting a release");
send_d6_release(server_ipv6, our_cur_ipv6); /* unicast */
d6_run_script(NULL, "deconfig");
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c
index fc7b621..e58acba 100644
--- a/networking/udhcp/dhcpc.c
+++ b/networking/udhcp/dhcpc.c
@@ -1118,7 +1118,11 @@ static void perform_release(uint32_t server_addr, uint32_t requested_ip)
struct in_addr temp_addr;
/* send release packet */
- if (state == BOUND || state == RENEWING || state == REBINDING) {
+ if (state == BOUND
+ || state == RENEWING
+ || state == REBINDING
+ || state == RENEW_REQUESTED
+ ) {
temp_addr.s_addr = server_addr;
strcpy(buffer, inet_ntoa(temp_addr));
temp_addr.s_addr = requested_ip;
More information about the busybox-cvs
mailing list