diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2018-01-17 13:55:51 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2018-01-17 13:55:51 +0100 |
commit | 7c44b600f9b2ca545421cb88147275e1351ba81f (patch) | |
tree | 3fb1daf3b354c71d834c81d9b0a2a9aba301db95 /networking/udhcp/dhcpc.c | |
parent | 64211ce6fa9222de0c6f52c50ff7caf1bfbd301e (diff) | |
download | busybox-w32-7c44b600f9b2ca545421cb88147275e1351ba81f.tar.gz busybox-w32-7c44b600f9b2ca545421cb88147275e1351ba81f.tar.bz2 busybox-w32-7c44b600f9b2ca545421cb88147275e1351ba81f.zip |
udhcpc[6]: remove overzealous timeout clamping code
function old new delta
udhcpc_main 2840 2826 -14
udhcpc6_main 2699 2670 -29
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/udhcp/dhcpc.c')
-rw-r--r-- | networking/udhcp/dhcpc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c index 55f21c187..385fc4998 100644 --- a/networking/udhcp/dhcpc.c +++ b/networking/udhcp/dhcpc.c | |||
@@ -1732,8 +1732,10 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv) | |||
1732 | /* paranoia: must not be too small and not prone to overflows */ | 1732 | /* paranoia: must not be too small and not prone to overflows */ |
1733 | if (lease_seconds < 0x10) | 1733 | if (lease_seconds < 0x10) |
1734 | lease_seconds = 0x10; | 1734 | lease_seconds = 0x10; |
1735 | if (lease_seconds > 0x7fffffff / 1000) | 1735 | //if (lease_seconds > 0x7fffffff) |
1736 | lease_seconds = 0x7fffffff / 1000; | 1736 | // lease_seconds = 0x7fffffff; |
1737 | //^^^not necessary since "timeout = lease_seconds / 2" | ||
1738 | //does not overflow even for 0xffffffff. | ||
1737 | } | 1739 | } |
1738 | #if ENABLE_FEATURE_UDHCPC_ARPING | 1740 | #if ENABLE_FEATURE_UDHCPC_ARPING |
1739 | if (opt & OPT_a) { | 1741 | if (opt & OPT_a) { |