diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2018-01-16 21:52:23 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2018-01-16 21:52:23 +0100 |
commit | 6e9e6d8fbe70d7b432dd3cca30d9974dee422890 (patch) | |
tree | e1c8abff457648df17cbc18f2c2a6a89c44c72bf /networking/udhcp | |
parent | 14f13205efda0d1dc09d97ffab036162c13b94d1 (diff) | |
download | busybox-w32-6e9e6d8fbe70d7b432dd3cca30d9974dee422890.tar.gz busybox-w32-6e9e6d8fbe70d7b432dd3cca30d9974dee422890.tar.bz2 busybox-w32-6e9e6d8fbe70d7b432dd3cca30d9974dee422890.zip |
udhcpc6: fix lease time staying very small because -d was not specified
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/udhcp')
-rw-r--r-- | networking/udhcp/d6_dhcpc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/networking/udhcp/d6_dhcpc.c b/networking/udhcp/d6_dhcpc.c index 3e200eb21..f6a01333c 100644 --- a/networking/udhcp/d6_dhcpc.c +++ b/networking/udhcp/d6_dhcpc.c | |||
@@ -1706,6 +1706,10 @@ int udhcpc6_main(int argc UNUSED_PARAM, char **argv) | |||
1706 | bb_error_msg("%s obtained, lease time %u", | 1706 | bb_error_msg("%s obtained, lease time %u", |
1707 | "prefix", /*inet_ntoa(temp_addr),*/ (unsigned)lease_seconds); | 1707 | "prefix", /*inet_ntoa(temp_addr),*/ (unsigned)lease_seconds); |
1708 | } | 1708 | } |
1709 | if (!address_timeout) | ||
1710 | address_timeout = prefix_timeout; | ||
1711 | if (!prefix_timeout) | ||
1712 | prefix_timeout = address_timeout; | ||
1709 | timeout = address_timeout > prefix_timeout ? prefix_timeout : address_timeout; | 1713 | timeout = address_timeout > prefix_timeout ? prefix_timeout : address_timeout; |
1710 | /* paranoia: must not be too small */ | 1714 | /* paranoia: must not be too small */ |
1711 | if (timeout < 0x10) | 1715 | if (timeout < 0x10) |