summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Kelley <simon@thekelleys.org.uk>2022-10-17 21:15:43 +0100
committerSimon Kelley <simon@thekelleys.org.uk>2022-10-17 21:15:43 +0100
commit930428fb970f4991e5c2933fd5a5d2504c18a551 (patch)
treeff47b3670127612fd51502bc443f67d8978ba19a
parent936be022d956882c3a980d15e8fa70f8858751d9 (diff)
downloaddnsmasq-930428fb970f4991e5c2933fd5a5d2504c18a551.tar.gz
Fix loss of DNS servers on config reload.
A bug, introduced in 2.87, which could result in DNS servers being removed from the configuration when reloading server configuration from DBus, or re-reading /etc/resolv.conf Only servers from the same source should be replaced, but some servers from other sources (ie hard coded or another dynamic source) could mysteriously disappear.
-rw-r--r--CHANGELOG12
-rw-r--r--src/domain-match.c4
2 files changed, 14 insertions, 2 deletions
diff --git a/CHANGELOG b/CHANGELOG
index fd4994d..ab8f9e1 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -22,7 +22,17 @@ version 2.88
handle removal of whole files or entries within files.
Thanks to Dominik Derigs for the initial patches for this.
-
+ Fix bug, introduced in 2.87, which could result in DNS
+ servers being removed from the configuration when reloading
+ server configuration from DBus, or re-reading /etc/resolv.conf
+ Only servers from the same source should be replaced, but some
+ servers from other sources (ie hard coded or another dynamic source)
+ could mysteriously disappear. Thanks to all reporting this,
+ but especially Christopher J. Masden who reduced the problem
+ to an easily reproducible case which saved mucg labour in
+ finding it.
+
+
version 2.87
Allow arbitrary prefix lengths in --rev-server and
--domain=....,local
diff --git a/src/domain-match.c b/src/domain-match.c
index f7db0fe..76a1109 100644
--- a/src/domain-match.c
+++ b/src/domain-match.c
@@ -683,7 +683,9 @@ int add_update_server(int flags,
serv->next = NULL;
}
break;
- }
+ }
+ else
+ up = &serv->next;
}
if (serv)