From a2d26dd525aebec876759e2d036ee6d3180c501d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Fri, 25 Nov 2022 11:21:24 +0100 Subject: [PATCH] Fix regression removing config statements on DBus change (#2148301) --- dnsmasq-2.87-dbus-file-reload.patch | 33 +++++++++++++++++++++++++++++ dnsmasq.spec | 8 ++++++- 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 dnsmasq-2.87-dbus-file-reload.patch diff --git a/dnsmasq-2.87-dbus-file-reload.patch b/dnsmasq-2.87-dbus-file-reload.patch new file mode 100644 index 0000000..f1e0d66 --- /dev/null +++ b/dnsmasq-2.87-dbus-file-reload.patch @@ -0,0 +1,33 @@ +From 930428fb970f4991e5c2933fd5a5d2504c18a551 Mon Sep 17 00:00:00 2001 +From: Simon Kelley +Date: Mon, 17 Oct 2022 21:15:43 +0100 +Subject: [PATCH] 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. +--- + src/domain-match.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +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) +-- +2.38.1 + diff --git a/dnsmasq.spec b/dnsmasq.spec index cd7ddc7..7c84848 100644 --- a/dnsmasq.spec +++ b/dnsmasq.spec @@ -20,7 +20,7 @@ Name: dnsmasq Version: 2.87 -Release: 2%{?extraversion:.%{extraversion}}%{?dist} +Release: 3%{?extraversion:.%{extraversion}}%{?dist} Summary: A lightweight DHCP/caching DNS server License: GPL-2.0-only or GPL-3.0-only @@ -41,6 +41,9 @@ Patch1: dnsmasq-2.77-underflow.patch # https://bugzilla.redhat.com/show_bug.cgi?id=1852373 Patch2: dnsmasq-2.81-configuration.patch Patch3: dnsmasq-2.78-fips.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=2148301 +# https://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commit;h=930428fb970f4991e5c2933fd5a5d2504c18a551 +Patch4: dnsmasq-2.87-dbus-file-reload.patch # https://bugzilla.redhat.com/show_bug.cgi?id=2009975 # replaces/enhances http://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commit;h=d290630d31f4517ab26392d00753d1397f9a4114 @@ -187,6 +190,9 @@ install -Dpm 644 %{SOURCE2} %{buildroot}%{_sysusersdir}/%{name}.conf %{_mandir}/man1/dhcp_* %changelog +* Fri Nov 25 2022 Petr Menšík - 2.87-3 +- Fix regression removing config statements on DBus change (#2148301) + * Fri Sep 30 2022 Petr Menšík - 2.87-2 - Update License tag to SPDX identifier