summaryrefslogtreecommitdiff
path: root/networking/udhcp/d6_dhcpc.c
diff options
context:
space:
mode:
authorDenys Vlasenko2018-10-30 11:56:18 +0100
committerDenys Vlasenko2018-10-30 11:56:18 +0100
commitc05aa6a776ab2420a42c041a3b5d45db587fd9ef (patch)
tree43e5120fd6a76e7a7d741a81169ca8da585ecb0c /networking/udhcp/d6_dhcpc.c
parenta541314b1f5e7392608cdef91e9098330823ed31 (diff)
downloadbusybox-c05aa6a776ab2420a42c041a3b5d45db587fd9ef.zip
busybox-c05aa6a776ab2420a42c041a3b5d45db587fd9ef.tar.gz
udhcpc: ensure at least one unicast renew attempt
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/udhcp/d6_dhcpc.c')
-rw-r--r--networking/udhcp/d6_dhcpc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/networking/udhcp/d6_dhcpc.c b/networking/udhcp/d6_dhcpc.c
index 66e4b6c..e2f8a6a 100644
--- a/networking/udhcp/d6_dhcpc.c
+++ b/networking/udhcp/d6_dhcpc.c
@@ -1738,8 +1738,9 @@ int udhcpc6_main(int argc UNUSED_PARAM, char **argv)
/* note: "int timeout" will not overflow even with 0xffffffff inputs here: */
timeout = (prefix_timeout < address_timeout ? prefix_timeout : address_timeout) / 2;
/* paranoia: must not be too small */
- if (timeout < 0x10)
- timeout = 0x10;
+ /* timeout > 60 - ensures at least one unicast renew attempt */
+ if (timeout < 61)
+ timeout = 61;
/* enter bound state */
d6_run_script(packet.d6_options, packet_end,
(state == REQUESTING ? "bound" : "renew"));