1 From 61b838dd574c51d96fef100285a0d225824534f9 Mon Sep 17 00:00:00 2001
2 From: Win King Wan <pinwing+dnsmasq@gmail.com>
3 Date: Wed, 21 Jan 2015 20:41:48 +0000
4 Subject: [PATCH 36/55] Don't reply to DHCPv6 SOLICIT messages when not
5 configured for statefull DHCPv6.
9 src/rfc3315.c | 13 +++++++++++++
10 2 files changed, 17 insertions(+)
12 diff --git a/CHANGELOG b/CHANGELOG
13 index 0076b557e95e..a4cb901e83ae 100644
16 @@ -59,6 +59,10 @@ version 2.73
17 cheaply than having dnsmasq re-read all its existing
18 configuration each time.
20 + Don't reply to DHCPv6 SOLICIT messages if we're not
21 + configured to do stateful DHCPv6. Thanks to Win King Wan
26 Add ra-advrouter mode, for RFC-3775 mobile IPv6 support.
27 diff --git a/src/rfc3315.c b/src/rfc3315.c
28 index ddb390bf1136..e593ec9c362c 100644
31 @@ -824,6 +824,19 @@ static int dhcp6_no_relay(struct state *state, int msg_type, void *inbuff, size_
35 + /* Windows 8 always requests an address even if the Managed bit
36 + in RA is 0 and it keeps retrying if it receives a reply
37 + stating that no addresses are available. We solve this
38 + by not replying at all if we're not configured to give any
39 + addresses by DHCPv6. RFC 3315 17.2.1. appears to allow this. */
41 + for (c = state->context; c; c = c->current)
42 + if (!(c->flags & CONTEXT_RA_STATELESS))
48 /* no address, return error */
49 o1 = new_opt6(OPTION6_STATUS_CODE);
50 put_opt6_short(DHCP6NOADDRS);