busybox/networking
Vladislav Grishenko 6464f15ddb udhcpc: on SIGUSR1, limit renew attempts time to 20 seconds; then do total reconfig
Scenario:

1. udhcpc gets lease for 86400 secs and sleeps for 43200 before renew attempt

2. PC gets physically disconnected and connected to another network

3. some phy control software sends SIGUSR1 to renew the lease, SIGUSR2 isn't
used because newly connected network could be the same as before

4. udhcpc sends unicast renew requests until lease timeout fall to 60 sec.
They are ignored by new network dhcp servers

5. udhcpc sends broadcast rebind requests for 60 seconds, which are NAKed
or ignored too

6. udhcpc deconfigs and starting from discover state, gets new lease for the
new network

So, pt.4+5 it could take up to 86400 secs without correct lease, which is
too long and not acceptable.

Second SIGUSR1 will immediately run into deconfig/discover state, which is
not preferable in case of the same subnet replugged.

This patch makes sure after SIGUSR1 timeout is no more than -A NUM
(usually 20 sec). It means that renew will be requested via broadcast,
and if no replies come back, full deconf/reconf cycle will be initiated
in 20 seconds.

Signed-off-by: Vladislav Grishenko <themiron@mail.ru>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-10-18 01:37:47 +02:00
..
libiproute iplink: tweak includes to work on android 2011-06-12 17:15:16 +02:00
udhcp udhcpc: on SIGUSR1, limit renew attempts time to 20 seconds; then do total reconfig 2011-10-18 01:37:47 +02:00
arp.c *: remove "Options:" string from help texts 2011-06-05 03:58:28 +02:00
arping.c *: remove "Options:" string from help texts 2011-06-05 03:58:28 +02:00
brctl.c move remaining help text from include/usage.src.h 2011-04-11 03:29:49 +02:00
Config.src nameif: add matching by phy_address=NUM; extend help text 2011-03-06 19:42:51 +01:00
dnsd.c typo fixes 2011-07-08 05:47:49 +02:00
ether-wake.c *: simplify Ethernet header includes 2011-06-10 05:17:59 +02:00
ftpd.c *: remove "Options:" string from help texts 2011-06-05 03:58:28 +02:00
ftpgetput.c *: remove "Options:" string from help texts 2011-06-05 03:58:28 +02:00
hostname.c *: remove "Options:" string from help texts 2011-06-05 03:58:28 +02:00
httpd_indexcgi.c *: make GNU licensing statement forms more regular 2010-08-16 20:14:46 +02:00
httpd_post_upload.txt httpd_post_upload.txt example: handle binary files too 2009-11-13 09:37:50 +01:00
httpd_ssi.c whitespace fixes 2011-02-03 00:05:48 +01:00
httpd.c wget: URL-decode user:password before base64-encoding it into auth hdr. Closes 3625. 2011-09-11 21:04:02 +02:00
ifconfig.c *: simplify Ethernet header includes 2011-06-10 05:17:59 +02:00
ifenslave.c *: remove "Options:" string from help texts 2011-06-05 03:58:28 +02:00
ifplugd.c *: simplify Ethernet header includes 2011-06-10 05:17:59 +02:00
ifupdown.c *: remove "Options:" string from help texts 2011-06-05 03:58:28 +02:00
inetd.c start_stop_daemon: set complementary group ids too. Closes 3253 2011-09-15 18:27:05 +02:00
interface.c *: simplify Ethernet header includes 2011-06-10 05:17:59 +02:00
ip.c *: remove "Options:" string from help texts 2011-06-05 03:58:28 +02:00
ipcalc.c *: remove "Options:" string from help texts 2011-06-05 03:58:28 +02:00
isrv_identd.c *: remove "Options:" string from help texts 2011-06-05 03:58:28 +02:00
isrv.c *: make GNU licensing statement forms more regular 2010-08-16 20:14:46 +02:00
isrv.h *: make GNU licensing statement forms more regular 2010-08-16 20:14:46 +02:00
Kbuild.src ping: add -t TTL option 2010-11-28 23:01:18 +01:00
nameif.c Replaced __u32 etc. with standard uint32_t style types 2011-06-10 05:34:05 +02:00
nbd-client.c mass removal of underscores from _BB_DIR_foo and _BB_SUID_foo 2011-01-18 13:58:01 +01:00
nc_bloaty.c *: remove "Options:" string from help texts 2011-06-05 03:58:28 +02:00
nc.c *: remove "Options:" string from help texts 2011-06-05 03:58:28 +02:00
netstat.c *: remove "Options:" string from help texts 2011-06-05 03:58:28 +02:00
nslookup.c move remaining help text from include/usage.src.h 2011-04-11 03:29:49 +02:00
ntpd_simple.c whitespace cleanup 2010-10-29 11:46:52 +02:00
ntpd.c *: remove "Options:" string from help texts 2011-06-05 03:58:28 +02:00
ping.c ping: display real IPv6 response address. Hopefully closes 3745. 2011-09-11 20:27:28 +02:00
pscan.c *: remove "Options:" string from help texts 2011-06-05 03:58:28 +02:00
route.c *: remove "Options:" string from help texts 2011-06-05 03:58:28 +02:00
slattach.c *: remove "Options:" string from help texts 2011-06-05 03:58:28 +02:00
tc.c Replaced __u32 etc. with standard uint32_t style types 2011-06-10 05:34:05 +02:00
tcpudp_perhost.c *: make GNU licensing statement forms more regular 2010-08-16 20:14:46 +02:00
tcpudp_perhost.h *: make GNU licensing statement forms more regular 2010-08-16 20:14:46 +02:00
tcpudp.c tcpudp: simplify help text 2011-07-25 16:35:44 +02:00
telnet.c more tweak for bionic 2011-07-08 08:49:40 +02:00
telnetd.c *: remove "Options:" string from help texts 2011-06-05 03:58:28 +02:00
telnetd.ctrlSQ.patch *: mass renaming of USE_XXXX to IF_XXXX 2009-04-21 11:09:40 +00:00
tftp.c tftp: mode string is case independent 2011-10-06 17:19:09 +02:00
traceroute.c networking: consolidate the IP checksum code. -129 bytes. 2011-09-07 17:55:40 +02:00
tunctl.c *: remove "Options:" string from help texts 2011-06-05 03:58:28 +02:00
vconfig.c *: remove "Options:" string from help texts 2011-06-05 03:58:28 +02:00
wget.c wget: URL-decode user:password before base64-encoding it into auth hdr. Closes 3625. 2011-09-11 21:04:02 +02:00
whois.c *: remove "Options:" string from help texts 2011-06-05 03:58:28 +02:00
zcip.c add INIT_G()'s. No code changes. 2011-09-21 01:59:15 +02:00