diff options
author | Denys Vlasenko | 2018-01-17 13:55:51 +0100 |
---|---|---|
committer | Denys Vlasenko | 2018-01-17 13:55:51 +0100 |
commit | 7c44b600f9b2ca545421cb88147275e1351ba81f (patch) | |
tree | 3fb1daf3b354c71d834c81d9b0a2a9aba301db95 /networking/udhcp/dhcpc.c | |
parent | 64211ce6fa9222de0c6f52c50ff7caf1bfbd301e (diff) | |
download | busybox-7c44b600f9b2ca545421cb88147275e1351ba81f.zip busybox-7c44b600f9b2ca545421cb88147275e1351ba81f.tar.gz |
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 55f21c1..385fc49 100644 --- a/networking/udhcp/dhcpc.c +++ b/networking/udhcp/dhcpc.c @@ -1732,8 +1732,10 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv) /* paranoia: must not be too small and not prone to overflows */ if (lease_seconds < 0x10) lease_seconds = 0x10; - if (lease_seconds > 0x7fffffff / 1000) - lease_seconds = 0x7fffffff / 1000; + //if (lease_seconds > 0x7fffffff) + // lease_seconds = 0x7fffffff; + //^^^not necessary since "timeout = lease_seconds / 2" + //does not overflow even for 0xffffffff. } #if ENABLE_FEATURE_UDHCPC_ARPING if (opt & OPT_a) { |