]> git.ipfire.org Git - ipfire-2.x.git/blame - src/patches/dnsmasq/0080-Revert-61b838dd574c51d96fef100285a0d225824534f9-and-.patch
Merge branch 'next' of ssh://git.ipfire.org/pub/git/ipfire-2.x into next
[ipfire-2.x.git] / src / patches / dnsmasq / 0080-Revert-61b838dd574c51d96fef100285a0d225824534f9-and-.patch
CommitLineData
6ac0a1a3
MT
1From 338b340be9e7198f5c0f68133d070d6598a0814c Mon Sep 17 00:00:00 2001
2From: Simon Kelley <simon@thekelleys.org.uk>
3Date: Mon, 20 Apr 2015 21:34:05 +0100
697b4f04 4Subject: [PATCH 080/113] Revert 61b838dd574c51d96fef100285a0d225824534f9 and
6ac0a1a3
MT
5 just quieten log instead.
6
7---
8 src/rfc3315.c | 24 ++++++++++--------------
9 1 file changed, 10 insertions(+), 14 deletions(-)
10
11diff --git a/src/rfc3315.c b/src/rfc3315.c
12index c1ddc805988d..c45116a40a09 100644
13--- a/src/rfc3315.c
14+++ b/src/rfc3315.c
15@@ -824,25 +824,21 @@ static int dhcp6_no_relay(struct state *state, int msg_type, void *inbuff, size_
16 }
17 else
18 {
19- /* Windows 8 always requests an address even if the Managed bit
20- in RA is 0 and it keeps retrying if it receives a reply
21- stating that no addresses are available. We solve this
22- by not replying at all if we're not configured to give any
23- addresses by DHCPv6. RFC 3315 17.2.1. appears to allow this. */
24-
25- for (c = state->context; c; c = c->current)
26- if (!(c->flags & CONTEXT_RA_STATELESS))
27- break;
28-
29- if (!c)
30- return 0;
31-
32 /* no address, return error */
33 o1 = new_opt6(OPTION6_STATUS_CODE);
34 put_opt6_short(DHCP6NOADDRS);
35 put_opt6_string(_("no addresses available"));
36 end_opt6(o1);
37- log6_packet(state, state->lease_allocate ? "DHCPREPLY" : "DHCPADVERTISE", NULL, _("no addresses available"));
38+
39+ /* Some clients will ask repeatedly when we're not giving
40+ out addresses because we're in stateless mode. Avoid spamming
41+ the log in that case. */
42+ for (c = state->context; c; c = c->current)
43+ if (!(c->flags & CONTEXT_RA_STATELESS))
44+ {
45+ log6_packet(state, state->lease_allocate ? "DHCPREPLY" : "DHCPADVERTISE", NULL, _("no addresses available"));
46+ break;
47+ }
48 }
49
50 break;
51--
522.1.0
53