aboutsummaryrefslogtreecommitdiff
path: root/networking/udhcp/dhcpc.c
diff options
context:
space:
mode:
Diffstat (limited to 'networking/udhcp/dhcpc.c')
-rw-r--r--networking/udhcp/dhcpc.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c
index 29a6cd5a1..ddfe3ccc0 100644
--- a/networking/udhcp/dhcpc.c
+++ b/networking/udhcp/dhcpc.c
@@ -1355,9 +1355,23 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
1355 switch (udhcp_sp_read(&rfds)) { 1355 switch (udhcp_sp_read(&rfds)) {
1356 case SIGUSR1: 1356 case SIGUSR1:
1357 client_config.first_secs = 0; /* make secs field count from 0 */ 1357 client_config.first_secs = 0; /* make secs field count from 0 */
1358 already_waited_sec = 0;
1358 perform_renew(); 1359 perform_renew();
1359 if (state == RENEW_REQUESTED) 1360 if (state == RENEW_REQUESTED) {
1361 /* We might be either on the same network
1362 * (in which case renew might work),
1363 * or we might be on a completely different one
1364 * (in which case renew won't ever succeed).
1365 * For the second case, must make sure timeout
1366 * is not too big, or else we can send
1367 * futile renew requests for hours.
1368 * (Ab)use -A TIMEOUT value (usually 20 sec)
1369 * as a cap on the timeout.
1370 */
1371 if (timeout > tryagain_timeout)
1372 timeout = tryagain_timeout;
1360 goto case_RENEW_REQUESTED; 1373 goto case_RENEW_REQUESTED;
1374 }
1361 /* Start things over */ 1375 /* Start things over */
1362 packet_num = 0; 1376 packet_num = 0;
1363 /* Kill any timeouts, user wants this to hurry along */ 1377 /* Kill any timeouts, user wants this to hurry along */