summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWin King Wan <pinwing+dnsmasq@gmail.com>2015-01-21 20:41:48 +0000
committerSimon Kelley <simon@thekelleys.org.uk>2015-01-21 20:41:48 +0000
commit61b838dd574c51d96fef100285a0d225824534f9 (patch)
treee1fbd7d0a05a7f8d32316786cda8f9db14109251
parentfbf01f7046e75f9aa73fd4aab2a94e43386d9052 (diff)
downloaddnsmasq-61b838dd574c51d96fef100285a0d225824534f9.tar.gz
Don't reply to DHCPv6 SOLICIT messages when not configured for statefull DHCPv6.
-rw-r--r--CHANGELOG4
-rw-r--r--src/rfc3315.c13
2 files changed, 17 insertions, 0 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 0076b55..a4cb901 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -59,6 +59,10 @@ version 2.73
cheaply than having dnsmasq re-read all its existing
configuration each time.
+ Don't reply to DHCPv6 SOLICIT messages if we're not
+ configured to do stateful DHCPv6. Thanks to Win King Wan
+ for the patch.
+
version 2.72
Add ra-advrouter mode, for RFC-3775 mobile IPv6 support.
diff --git a/src/rfc3315.c b/src/rfc3315.c
index ddb390b..e593ec9 100644
--- a/src/rfc3315.c
+++ b/src/rfc3315.c
@@ -824,6 +824,19 @@ static int dhcp6_no_relay(struct state *state, int msg_type, void *inbuff, size_
}
else
{
+ /* Windows 8 always requests an address even if the Managed bit
+ in RA is 0 and it keeps retrying if it receives a reply
+ stating that no addresses are available. We solve this
+ by not replying at all if we're not configured to give any
+ addresses by DHCPv6. RFC 3315 17.2.1. appears to allow this. */
+
+ for (c = state->context; c; c = c->current)
+ if (!(c->flags & CONTEXT_RA_STATELESS))
+ break;
+
+ if (!c)
+ return 0;
+
/* no address, return error */
o1 = new_opt6(OPTION6_STATUS_CODE);
put_opt6_short(DHCP6NOADDRS);