aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/services/dnsmasq/patches/0011-Handle-standard-and-contructed-dhcp-ranges-on-the-sa.patch
diff options
context:
space:
mode:
authorKevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>2018-06-03 04:44:12 +0100
committerKevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>2018-07-03 13:58:55 +0100
commitfbf475403b911f46e91b57fb7a6cf3c65276464c (patch)
treeec7616ef34cde4fc0f9ec170312a4ee7a8253470 /package/network/services/dnsmasq/patches/0011-Handle-standard-and-contructed-dhcp-ranges-on-the-sa.patch
parentabeae38dbbe8b7fda10ad36fb5db57ed16c93479 (diff)
downloadupstream-fbf475403b911f46e91b57fb7a6cf3c65276464c.tar.gz
upstream-fbf475403b911f46e91b57fb7a6cf3c65276464c.tar.bz2
upstream-fbf475403b911f46e91b57fb7a6cf3c65276464c.zip
dnsmasq: bump to latest patches on 2.80rc2
Refresh patches and backport upstream to current HEAD: a997ca0 Fix sometimes missing DNSSEC RRs when DNSSEC validation not enabled. 51e4eee Fix address-dependent domains for IPv6. 05ff659 Fix stupid infinite loop introduced by preceding commit. db0f488 Handle some corner cases in RA contructed interfaces with addresses changing interface. 7dcca6c Warn about the impact of cache-size on performance. 090856c Allow zone transfer in authoritative mode whenever auth-peer is specified. cc5cc8f Sane error message when pcap file header is wrong. c488b68 Handle standard and contructed dhcp-ranges on the same interface. Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Diffstat (limited to 'package/network/services/dnsmasq/patches/0011-Handle-standard-and-contructed-dhcp-ranges-on-the-sa.patch')
-rw-r--r--package/network/services/dnsmasq/patches/0011-Handle-standard-and-contructed-dhcp-ranges-on-the-sa.patch70
1 files changed, 70 insertions, 0 deletions
diff --git a/package/network/services/dnsmasq/patches/0011-Handle-standard-and-contructed-dhcp-ranges-on-the-sa.patch b/package/network/services/dnsmasq/patches/0011-Handle-standard-and-contructed-dhcp-ranges-on-the-sa.patch
new file mode 100644
index 0000000000..5ded822efe
--- /dev/null
+++ b/package/network/services/dnsmasq/patches/0011-Handle-standard-and-contructed-dhcp-ranges-on-the-sa.patch
@@ -0,0 +1,70 @@
+From c488b68e75ee5304007eef37203c4fc10193d191 Mon Sep 17 00:00:00 2001
+From: Simon Kelley <simon@thekelleys.org.uk>
+Date: Sat, 2 Jun 2018 13:06:00 +0100
+Subject: [PATCH 11/17] Handle standard and contructed dhcp-ranges on the same
+ interface.
+
+Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
+---
+ CHANGELOG | 6 ++++++
+ src/dhcp6.c | 29 +++++++++++++++++------------
+ 2 files changed, 23 insertions(+), 12 deletions(-)
+
+--- a/CHANGELOG
++++ b/CHANGELOG
+@@ -23,6 +23,12 @@ version 2.80
+ which packets should be dumped is given by the --dumpmask
+ option.
+
++ Handle the case of both standard and constructed dhcp-ranges on the
++ same interface better. We don't now contruct a dhcp-range if there's
++ already one specified. This allows the specified interface to
++ have different parameters and avoids advertising the same
++ prefix twice. Thanks to Luis Marsano for spotting this case.
++
+
+ version 2.79
+ Fix parsing of CNAME arguments, which are confused by extra spaces.
+--- a/src/dhcp6.c
++++ b/src/dhcp6.c
+@@ -667,23 +667,28 @@ static int construct_worker(struct in6_a
+ end6 = *local;
+ setaddr6part(&end6, addr6part(&template->end6));
+
++ /* If there's an absolute address context covering this address
++ then don't contruct one as well. */
+ for (context = daemon->dhcp6; context; context = context->next)
+- if ((context->flags & CONTEXT_CONSTRUCTED) &&
++ if (!(context->flags & CONTEXT_TEMPLATE) &&
+ IN6_ARE_ADDR_EQUAL(&start6, &context->start6) &&
+ IN6_ARE_ADDR_EQUAL(&end6, &context->end6))
+ {
+- int flags = context->flags;
+- context->flags &= ~(CONTEXT_GC | CONTEXT_OLD);
+- if (flags & CONTEXT_OLD)
++ if (context->flags & CONTEXT_CONSTRUCTED)
+ {
+- /* address went, now it's back */
+- log_context(AF_INET6, context);
+- /* fast RAs for a while */
+- ra_start_unsolicited(param->now, context);
+- param->newone = 1;
+- /* Add address to name again */
+- if (context->flags & CONTEXT_RA_NAME)
+- param->newname = 1;
++ int cflags = context->flags;
++ context->flags &= ~(CONTEXT_GC | CONTEXT_OLD);
++ if (cflags & CONTEXT_OLD)
++ {
++ /* address went, now it's back */
++ log_context(AF_INET6, context);
++ /* fast RAs for a while */
++ ra_start_unsolicited(param->now, context);
++ param->newone = 1;
++ /* Add address to name again */
++ if (context->flags & CONTEXT_RA_NAME)
++ param->newname = 1;
++ }
+ }
+ break;
+ }