.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd April 9, 2011
+.Dd November 22, 2011
.Dt DHCPCD 8 SMM
.Os
.Sh NAME
Allow
.Ar reboot
seconds before moving to the discover phase if we have an old lease to use.
-The default is 10 seconds.
+The default is 5 seconds.
A setting of 0 seconds causes
.Nm
to skip the reboot phase and go straight into discover.
exit(EXIT_FAILURE);
}
options &= ~DHCPCD_TIMEOUT_IPV4LL;
- timeout = (PROBE_NUM * PROBE_MAX) + PROBE_WAIT + 1;
+ timeout = (PROBE_NUM * PROBE_MAX) + (PROBE_WAIT * 2);
syslog(LOG_WARNING, "allowing %d seconds for IPv4LL timeout", timeout);
add_timeout_sec(timeout, handle_exit_timeout, NULL);
}
{
struct interface *iface = arg;
struct if_options *ifo = iface->state->options;
+ int timeout = ifo->timeout;
+
+ /* If we're rebooting and we're not daemonised then we need
+ * to shorten the normal timeout to ensure we try correctly
+ * for a fallback or IPv4LL address. */
+ if (iface->state->state == DHS_REBOOT &&
+ !(options & DHCPCD_DAEMONISED))
+ {
+ timeout -= ifo->reboot;
+ if (timeout <= 0)
+ timeout = 2;
+ }
iface->state->state = DHS_DISCOVER;
iface->state->xid = dhcp_xid(iface);
delete_timeout(NULL, iface);
if (ifo->fallback)
- add_timeout_sec(ifo->timeout, start_fallback, iface);
+ add_timeout_sec(timeout, start_fallback, iface);
else if (ifo->options & DHCPCD_IPV4LL &&
!IN_LINKLOCAL(htonl(iface->addr.s_addr)))
{
if (IN_LINKLOCAL(htonl(iface->state->fail.s_addr)))
add_timeout_sec(RATE_LIMIT_INTERVAL, start_ipv4ll, iface);
else
- add_timeout_sec(ifo->timeout, start_ipv4ll, iface);
+ add_timeout_sec(timeout, start_ipv4ll, iface);
}
if (ifo->options & DHCPCD_REQUEST)
syslog(LOG_INFO, "%s: broadcasting for a lease (requesting %s)",
-.\" Copyright (c) 2006-2010 Roy Marples
+.\" Copyright (c) 2006-2011 Roy Marples
.\" All rights reserved
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd January 28, 2010
+.Dd November 22, 2011
.Dt DHCPCD.CONF 5 SMM
.Os
.Sh NAME
Allow
.Ar reboot
seconds before moving to the discover phase if we have an old lease to use.
-The default is 10 seconds.
+The default is 5 seconds.
A setting if 0 seconds causes
.Nm dhcpcd
to skip the reboot phase and go straight into discover.
#define IF_OPTS "bc:de:f:gh:i:kl:m:no:pqr:s:t:u:v:wxy:z:ABC:DEF:GHI:JKLO:Q:S:TUVW:X:Z:"
#define DEFAULT_TIMEOUT 30
-#define DEFAULT_REBOOT 10
+#define DEFAULT_REBOOT 5
#define HOSTNAME_MAX_LEN 250 /* 255 - 3 (FQDN) - 2 (DNS enc) */
#define VENDORCLASSID_MAX_LEN 255