udhcpc: run "deconfig" script in manual renew state too. closes 9061
authorDenys Vlasenko <vda.linux@googlemail.com>
Sun, 3 Jul 2016 18:26:44 +0000 (20:26 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Sun, 3 Jul 2016 18:26:44 +0000 (20:26 +0200)
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@googlemail.com>
networking/udhcp/d6_dhcpc.c
networking/udhcp/dhcpc.c

index c77669a31d83e2f0a1cad1136f682b23afcd50a3..12f8f112505351fb98d6d1c35606f807d1d632d5 100644 (file)
@@ -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");
index fc7b6216d777dcfb0552fb2121ad46e1ed12e558..e58acbaca40b9c0e2ec737c5e4ed92e062c3e6b0 100644 (file)
@@ -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;