aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/services/dnsmasq/patches/0015-Handle-some-corner-cases-in-RA-contructed-interfaces.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/0015-Handle-some-corner-cases-in-RA-contructed-interfaces.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/0015-Handle-some-corner-cases-in-RA-contructed-interfaces.patch')
-rw-r--r--package/network/services/dnsmasq/patches/0015-Handle-some-corner-cases-in-RA-contructed-interfaces.patch64
1 files changed, 64 insertions, 0 deletions
diff --git a/package/network/services/dnsmasq/patches/0015-Handle-some-corner-cases-in-RA-contructed-interfaces.patch b/package/network/services/dnsmasq/patches/0015-Handle-some-corner-cases-in-RA-contructed-interfaces.patch
new file mode 100644
index 0000000000..ce9ce4af5a
--- /dev/null
+++ b/package/network/services/dnsmasq/patches/0015-Handle-some-corner-cases-in-RA-contructed-interfaces.patch
@@ -0,0 +1,64 @@
+From db0f488ea8f5ded7c57400c9108ec3c9367d75c5 Mon Sep 17 00:00:00 2001
+From: Simon Kelley <simon@thekelleys.org.uk>
+Date: Thu, 7 Jun 2018 21:37:02 +0100
+Subject: [PATCH 15/17] Handle some corner cases in RA contructed interfaces
+ with addresses changing interface.
+
+Thanks to Vladislav Grishenko for work on this.
+
+Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
+---
+ src/dhcp6.c | 16 ++++++++++------
+ 1 file changed, 10 insertions(+), 6 deletions(-)
+
+--- a/src/dhcp6.c
++++ b/src/dhcp6.c
+@@ -640,7 +640,7 @@ static int construct_worker(struct in6_a
+ return 0;
+
+ for (template = daemon->dhcp6; template; template = template->next)
+- if (!(template->flags & CONTEXT_TEMPLATE))
++ if (!(template->flags & (CONTEXT_TEMPLATE | CONTEXT_CONSTRUCTED)))
+ {
+ /* non-template entries, just fill in interface and local addresses */
+ if (prefix <= template->prefix &&
+@@ -667,20 +667,23 @@ 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_TEMPLATE) &&
+ IN6_ARE_ADDR_EQUAL(&start6, &context->start6) &&
+ IN6_ARE_ADDR_EQUAL(&end6, &context->end6))
+ {
+- if (context->flags & CONTEXT_CONSTRUCTED)
++ /* If there's an absolute address context covering this address
++ then don't construct one as well. */
++ if (!(context->flags & CONTEXT_CONSTRUCTED))
++ break;
++
++ if (context->if_index == if_index)
+ {
+ int cflags = context->flags;
+ context->flags &= ~(CONTEXT_GC | CONTEXT_OLD);
+ if (cflags & CONTEXT_OLD)
+ {
+- /* address went, now it's back */
++ /* address went, now it's back, and on the same interface */
+ log_context(AF_INET6, context);
+ /* fast RAs for a while */
+ ra_start_unsolicited(param->now, context);
+@@ -688,9 +691,10 @@ static int construct_worker(struct in6_a
+ /* Add address to name again */
+ if (context->flags & CONTEXT_RA_NAME)
+ param->newname = 1;
++
++ break;
+ }
+ }
+- break;
+ }
+
+ if (!context && (context = whine_malloc(sizeof (struct dhcp_context))))