Commit 8d030462 authored by Simon Kelley's avatar Simon Kelley

Add --force-fast-ra option.

parent 9f48ffa1
......@@ -90,6 +90,8 @@ version 2.67
smallest valid dhcp-range is sent. Thanks to Uwe Schindler
for suggesting this.
Add --force-fast-ra option. Another thanks to Uwe Schindler.
version 2.66
Add the ability to act as an authoritative DNS
......
......@@ -1487,6 +1487,12 @@ the relevant link-local address of the machine running dnsmasq is sent
as recursive DNS server. If provided, the DHCPv6 options dns-server and
domain-search are used for RDNSS and DNSSL.
.TP
.B --force-fast-ra
Normally, dnsmasq advertises a new IPv6 prefix frequently (every 10 seconds or so) for the first minute, and then
drops back to sending "maintenance" advertisements every 10 minutes or so. This option forces dnsmasq to be always in
frequent RA mode. It's a bug workaround for mobile devices which go deaf to RAs during sleep and therefore
lose conectivity; with frequent RAs they recover in a reasonable time after wakeup.
.TP
.B --enable-tftp
Enable the TFTP server function. This is deliberately limited to that
needed to net-boot a client. Only reading is allowed; the tsize and
......
......@@ -221,7 +221,8 @@ struct event_desc {
#define OPT_TFTP_LC 38
#define OPT_CLEVERBIND 39
#define OPT_TFTP 40
#define OPT_LAST 41
#define OPT_FAST_RA 41
#define OPT_LAST 42
/* extra flags for my_syslog, we use a couple of facilities since they are known
not to occupy the same bits as priorities, no matter how syslog.h is set up. */
......
......@@ -132,6 +132,7 @@ struct myoption {
#ifdef OPTION6_PREFIX_CLASS
#define LOPT_PREF_CLSS 321
#endif
#define LOPT_FAST_RA 322
#ifdef HAVE_GETOPT_LONG
static const struct option opts[] =
......@@ -269,6 +270,7 @@ static const struct myoption opts[] =
#ifdef OPTION6_PREFIX_CLASS
{ "dhcp-prefix-class", 1, 0, LOPT_PREF_CLSS },
#endif
{ "force-fast-ra", 0, 0, LOPT_FAST_RA },
{ NULL, 0, 0, 0 }
};
......@@ -397,6 +399,7 @@ static struct {
{ LOPT_CONNTRACK, OPT_CONNTRACK, NULL, gettext_noop("Copy connection-track mark from queries to upstream connections."), NULL },
{ LOPT_FQDN, OPT_FQDN_UPDATE, NULL, gettext_noop("Allow DHCP clients to do their own DDNS updates."), NULL },
{ LOPT_RA, OPT_RA, NULL, gettext_noop("Send router-advertisements for interfaces doing DHCPv6"), NULL },
{ LOPT_FAST_RA, OPT_FAST_RA, NULL, gettext_noop("Always send frequent router-advertisements"), NULL },
{ LOPT_DUID, ARG_ONE, "<enterprise>,<duid>", gettext_noop("Specify DUID_EN-type DHCPv6 server DUID"), NULL },
{ LOPT_HOST_REC, ARG_DUP, "<name>,<address>", gettext_noop("Specify host (A/AAAA and PTR) records"), NULL },
{ LOPT_RR, ARG_DUP, "<name>,<RR-number>,[<data>]", gettext_noop("Specify arbitrary DNS resource record"), NULL },
......
......@@ -652,7 +652,7 @@ static int iface_search(struct in6_addr *local, int prefix,
static void new_timeout(struct dhcp_context *context, time_t now)
{
if (difftime(now, context->ra_short_period_start) < 60.0)
if (difftime(now, context->ra_short_period_start) < 60.0 || option_bool(OPT_FAST_RA))
/* range 5 - 20 */
context->ra_time = now + 5 + (rand16()/4400);
else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment