diff options
-rw-r--r-- | networking/udhcp/d6_dhcpc.c | 10 | ||||
-rw-r--r-- | networking/udhcp/dhcpc.c | 10 |
2 files changed, 12 insertions, 8 deletions
diff --git a/networking/udhcp/d6_dhcpc.c b/networking/udhcp/d6_dhcpc.c index 1a58f5f44..7f288f891 100644 --- a/networking/udhcp/d6_dhcpc.c +++ b/networking/udhcp/d6_dhcpc.c | |||
@@ -1517,6 +1517,9 @@ int udhcpc6_main(int argc UNUSED_PARAM, char **argv) | |||
1517 | if (client_data.state <= REQUESTING) | 1517 | if (client_data.state <= REQUESTING) |
1518 | /* Initial negotiations in progress, do not disturb */ | 1518 | /* Initial negotiations in progress, do not disturb */ |
1519 | break; | 1519 | break; |
1520 | if (client_data.state == REBINDING) | ||
1521 | /* Do not go back from rebind to renew state */ | ||
1522 | break; | ||
1520 | 1523 | ||
1521 | if (lease_remaining > 30) /* if renew fails, do not go back to BOUND */ | 1524 | if (lease_remaining > 30) /* if renew fails, do not go back to BOUND */ |
1522 | lease_remaining = 30; | 1525 | lease_remaining = 30; |
@@ -1524,22 +1527,21 @@ int udhcpc6_main(int argc UNUSED_PARAM, char **argv) | |||
1524 | packet_num = 0; | 1527 | packet_num = 0; |
1525 | 1528 | ||
1526 | switch (client_data.state) { | 1529 | switch (client_data.state) { |
1527 | /* Try to renew/rebind */ | ||
1528 | case BOUND: | 1530 | case BOUND: |
1529 | case RENEWING: | 1531 | case RENEWING: |
1530 | case REBINDING: | 1532 | /* Try to renew/rebind */ |
1531 | change_listen_mode(LISTEN_KERNEL); | 1533 | change_listen_mode(LISTEN_KERNEL); |
1532 | client_data.state = RENEW_REQUESTED; | 1534 | client_data.state = RENEW_REQUESTED; |
1533 | goto got_SIGUSR1; | 1535 | goto got_SIGUSR1; |
1534 | 1536 | ||
1535 | /* Two SIGUSR1 received, start things over */ | ||
1536 | case RENEW_REQUESTED: | 1537 | case RENEW_REQUESTED: |
1538 | /* Two SIGUSR1 received, start things over */ | ||
1537 | change_listen_mode(LISTEN_NONE); | 1539 | change_listen_mode(LISTEN_NONE); |
1538 | d6_run_script_no_option("deconfig"); | 1540 | d6_run_script_no_option("deconfig"); |
1539 | 1541 | ||
1540 | /* Wake from SIGUSR2-induced deconfigured state */ | ||
1541 | default: | 1542 | default: |
1542 | /* case RELEASED: */ | 1543 | /* case RELEASED: */ |
1544 | /* Wake from SIGUSR2-induced deconfigured state */ | ||
1543 | change_listen_mode(LISTEN_NONE); | 1545 | change_listen_mode(LISTEN_NONE); |
1544 | } | 1546 | } |
1545 | client_data.state = INIT_SELECTING; | 1547 | client_data.state = INIT_SELECTING; |
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c index e55b606cd..f388003a3 100644 --- a/networking/udhcp/dhcpc.c +++ b/networking/udhcp/dhcpc.c | |||
@@ -1582,6 +1582,9 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv) | |||
1582 | if (client_data.state <= REQUESTING) | 1582 | if (client_data.state <= REQUESTING) |
1583 | /* Initial negotiations in progress, do not disturb */ | 1583 | /* Initial negotiations in progress, do not disturb */ |
1584 | break; | 1584 | break; |
1585 | if (client_data.state == REBINDING) | ||
1586 | /* Do not go back from rebind to renew state */ | ||
1587 | break; | ||
1585 | 1588 | ||
1586 | if (lease_remaining > 30) /* if renew fails, do not go back to BOUND */ | 1589 | if (lease_remaining > 30) /* if renew fails, do not go back to BOUND */ |
1587 | lease_remaining = 30; | 1590 | lease_remaining = 30; |
@@ -1589,21 +1592,20 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv) | |||
1589 | packet_num = 0; | 1592 | packet_num = 0; |
1590 | 1593 | ||
1591 | switch (client_data.state) { | 1594 | switch (client_data.state) { |
1592 | /* Try to renew/rebind */ | ||
1593 | case BOUND: | 1595 | case BOUND: |
1594 | case RENEWING: | 1596 | case RENEWING: |
1595 | case REBINDING: | 1597 | /* Try to renew/rebind */ |
1596 | client_data.state = RENEW_REQUESTED; | 1598 | client_data.state = RENEW_REQUESTED; |
1597 | goto got_SIGUSR1; | 1599 | goto got_SIGUSR1; |
1598 | 1600 | ||
1599 | /* Two SIGUSR1 received, start things over */ | ||
1600 | case RENEW_REQUESTED: | 1601 | case RENEW_REQUESTED: |
1602 | /* Two SIGUSR1 received, start things over */ | ||
1601 | change_listen_mode(LISTEN_NONE); | 1603 | change_listen_mode(LISTEN_NONE); |
1602 | d4_run_script_deconfig(); | 1604 | d4_run_script_deconfig(); |
1603 | 1605 | ||
1604 | /* Wake from SIGUSR2-induced deconfigured state */ | ||
1605 | default: | 1606 | default: |
1606 | /* case RELEASED: */ | 1607 | /* case RELEASED: */ |
1608 | /* Wake from SIGUSR2-induced deconfigured state */ | ||
1607 | change_listen_mode(LISTEN_NONE); | 1609 | change_listen_mode(LISTEN_NONE); |
1608 | } | 1610 | } |
1609 | client_data.state = INIT_SELECTING; | 1611 | client_data.state = INIT_SELECTING; |