busybox/networking/udhcp
Denys Vlasenko a1a77ad5ea udhcpc[6]: untangle "timeout" and "remaining lease"; reduce min lease to 30 seconds
This allows to fix a problem that we wait for renew replies
for up to half the lease (!!!) if they never come.

Make it so that lease of 60 seconds is not "rounded up" to 120 seconds -
set lower "sanity limit" to 30 seconds.

After 3 failed renew attempts, switch to rebind.

After this change, we can have more flexible choice of when to do
the first renew - does not need to be equal to lease / 2.

function                                             old     new   delta
udhcpc6_main                                        2568    2576      +8
.rodata                                           103339  103294     -45
udhcpc_main                                         2609    2550     -59
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/2 up/down: 8/-104)            Total: -96 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2021-05-01 12:23:25 +02:00
..
arpping.c libbb: reduce the overhead of single parameter bb_error_msg() calls 2019-07-02 11:35:03 +02:00
common.c udhcpc: ignore zero-length DHCP options, take 2 2021-03-16 11:42:56 +01:00
common.h udhcp: bind to device even for ucast packets 2020-12-15 21:44:21 +01:00
Config.src udhcpc: Add support to change default interface name 2021-01-01 19:08:28 +01:00
d6_common.h udhcpc6: code shrink - sending functions do not need ifindex parameter 2020-12-15 21:55:15 +01:00
d6_dhcpc.c udhcpc[6]: untangle "timeout" and "remaining lease"; reduce min lease to 30 seconds 2021-05-01 12:23:25 +02:00
d6_packet.c udhcpc6: code shrink - sending functions do not need ifindex parameter 2020-12-15 21:55:15 +01:00
d6_socket.c libbb: reduce the overhead of single parameter bb_error_msg() calls 2019-07-02 11:35:03 +02:00
dhcpc.c udhcpc[6]: untangle "timeout" and "remaining lease"; reduce min lease to 30 seconds 2021-05-01 12:23:25 +02:00
dhcpc.h udhcpc: add support for long options 2020-08-13 16:48:07 +02:00
dhcpd.c udhcp: reuse strings 2021-02-21 16:32:07 +01:00
dhcpd.h udhcp: rename server_config to server_data 2019-05-30 16:23:34 +02:00
dhcprelay.c libbb: reduce the overhead of single parameter bb_error_msg() calls 2019-07-02 11:35:03 +02:00
domain_codec.c domain_codec: optimize dname_dec and convert_dname 2020-07-12 21:19:13 +02:00
dumpleases.c libbb: introduce and use fputs_stdout 2021-02-03 20:52:40 +01:00
Kbuild.src fix breakage found by mass one-applet builds 2016-12-23 02:42:26 +01:00
packet.c udhcp: bind to device even for ucast packets 2020-12-15 21:44:21 +01:00
signalpipe.c fix gcc-11.0 warnings 2021-04-14 17:52:18 +02:00
socket.c libbb: reduce the overhead of single parameter bb_error_msg() calls 2019-07-02 11:35:03 +02:00