Fix NODATA instead of NXDOMAIN (#1674067)

Fix bug added in 2.80 non-terminal code which returns NODATA instead of NXDOMAIN.

Thanks to Sven Muleller and Maciej Żenczykowski for work on this.
This commit is contained in:
Petr Menšík 2019-04-12 10:19:39 +02:00
parent d7adf990db
commit 6b2ad2c800
2 changed files with 37 additions and 1 deletions

View File

@ -0,0 +1,31 @@
From 162e5e0062ce923c494cc64282f293f0ed64fc10 Mon Sep 17 00:00:00 2001
From: Sven Mueller <smu@google.com>
Date: Wed, 27 Feb 2019 21:17:37 +0000
Subject: [PATCH] Fix bug added in 2.80 non-terminal code which returns NODATA
instead of NXDOMAIN.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Thanks to Sven Muleller and Maciej Żenczykowski for work on this.
https://bugzilla.redhat.com/show_bug.cgi?id=1674067 refers.
---
src/cache.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/cache.c b/src/cache.c
index 906f5e1..44c13e4 100644
--- a/src/cache.c
+++ b/src/cache.c
@@ -790,6 +790,7 @@ int cache_find_non_terminal(char *name, time_t now)
if (!is_outdated_cname_pointer(crecp) &&
!is_expired(now, crecp) &&
(crecp->flags & F_FORWARD) &&
+ !(crecp->flags & F_NXDOMAIN) &&
hostname_isequal(name, cache_get_name(crecp)))
return 1;
--
2.20.1

View File

@ -13,7 +13,7 @@
Name: dnsmasq Name: dnsmasq
Version: 2.80 Version: 2.80
Release: 5%{?extraversion:.%{extraversion}}%{?dist} Release: 6%{?extraversion:.%{extraversion}}%{?dist}
Summary: A lightweight DHCP/caching DNS server Summary: A lightweight DHCP/caching DNS server
License: GPLv2 or GPLv3 License: GPLv2 or GPLv3
@ -26,6 +26,8 @@ Source2: dnsmasq-systemd-sysusers.conf
Patch1: dnsmasq-2.77-underflow.patch Patch1: dnsmasq-2.77-underflow.patch
Patch3: dnsmasq-2.78-fips.patch Patch3: dnsmasq-2.78-fips.patch
Patch5: dnsmasq-2.79-randomize-ports.patch Patch5: dnsmasq-2.79-randomize-ports.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1674067
Patch6: dnsmasq-2.80-rh1674067.patch
# This is workaround to nettle bug #1549190 # This is workaround to nettle bug #1549190
# https://bugzilla.redhat.com/show_bug.cgi?id=1549190 # https://bugzilla.redhat.com/show_bug.cgi?id=1549190
@ -158,6 +160,9 @@ install -Dpm 644 %{SOURCE2} %{buildroot}%{_sysusersdir}/%{name}.conf
%{_mandir}/man1/dhcp_* %{_mandir}/man1/dhcp_*
%changelog %changelog
* Wed Jul 24 2019 Petr Menšík <pemensik@redhat.com> - 2.80-6
- Do not return NXDOMAIN on empty non-terminals (#1674067)
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.80-5 * Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.80-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild