<div dir="ltr">Hi,<br><br>In <a href="https://github.com/RMerl/asuswrt-merlin/pull/854">https://github.com/RMerl/asuswrt-merlin/pull/854</a> I patched the dnsmasq version of my router's firmware to not send out replies to DHCPv6 queries when dhcp-range mode is ra-stateless.<br><br>Even though the M flag is off in the router advertisement, Windows 8 (and newer) clients will still request an address via DHCPv6. When it receives a reply that no addresses are available, it tries a few more time before giving up for several minutes. After several minutes however it retries.<br>This causes the syslog to be filled up with noise stating that there are no DHCPv6 addresses available for a specific MAC address. (--quiet-dhcp6 does not help much as the "no addresses available" message is always logged.)<br><br>My changes basically stops dnsmasq from sending this reply. Since the O flag is on, Windows 8 will try to get other information from the DHCPv6 server if it does not get an reply for its initial request for an address (which seems to still work, as it is able to get the IPv6 DNS server).<br><br>After running Wireshark for quite some time, it appears that Windows 8 will not send out subsequent requests for an IPv6 address to the DHCPv6 server (after my patch), at least not within several minutes.<br><br>I have included the patch for completeness sake.<br>Would it be possible to apply it? Or perhaps there is a better or more elegant solution to this problem?<br><br><pre style="white-space:pre-wrap;color:rgb(0,0,0);word-wrap:break-word">diff --git a/src/rfc3315.c b/src/rfc3315.c
index ddb390b..1f3646a 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
{
+ int all_stateless = 1;
+ for (c = state->context; c; c = c->current)
+ if (!(c->flags & CONTEXT_RA_STATELESS))
+ {
+ all_stateless = 0;
+ break;
+ }
+ if (all_stateless)
+ /* 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 */
+ return 0;
+
/* no address, return error */
o1 = new_opt6(OPTION6_STATUS_CODE);
put_opt6_short(DHCP6NOADDRS);</pre></div>