diff --git a/dnsmasq-2.87-tcp-strcasecmp.patch b/dnsmasq-2.87-tcp-strcasecmp.patch new file mode 100644 index 0000000..8e15cff --- /dev/null +++ b/dnsmasq-2.87-tcp-strcasecmp.patch @@ -0,0 +1,33 @@ +From 6ad1f6f44e77619eeb1f9f16e205c24a1dc3e68b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= +Date: Thu, 14 Oct 2021 20:56:17 +0200 +Subject: [PATCH] Compare order case insensitive +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +DNS labels are defined case insensitive. When queried over TCP, query +name is not put to lower case. Make it match even when domain differs +only by used case. + +Signed-off-by: Petr Menšík +--- + src/domain-match.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/domain-match.c b/src/domain-match.c +index e5b409e..3a69aa1 100644 +--- a/src/domain-match.c ++++ b/src/domain-match.c +@@ -495,7 +495,7 @@ static int order(char *qdomain, size_t qlen, struct server *serv) + if (qlen > dlen) + return -1; + +- return strcmp(qdomain, serv->domain); ++ return strcasecmp(qdomain, serv->domain); + } + + static int order_servers(struct server *s1, struct server *s2) +-- +2.31.1 + diff --git a/dnsmasq.spec b/dnsmasq.spec index 2a49176..f4b486d 100644 --- a/dnsmasq.spec +++ b/dnsmasq.spec @@ -62,6 +62,8 @@ Patch25: dnsmasq-2.86-domain-match-local.patch # https://bugzilla.redhat.com/show_bug.cgi?id=2009975 # replaces/enhances http://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commit;h=d290630d31f4517ab26392d00753d1397f9a4114 Patch26: dnsmasq-2.86-build_server_array.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=2014019 +Patch28: dnsmasq-2.87-tcp-strcasecmp.patch @@ -207,6 +209,7 @@ install -Dpm 644 %{SOURCE2} %{buildroot}%{_sysusersdir}/%{name}.conf %changelog * Thu Oct 14 2021 Petr Menšík - 2.86-3 - Rebuild server_array on any server change (#2009975) +- Compare case-insensitive also TCP queries (#2014019) * Thu Sep 23 2021 Petr Menšík - 2.86-2 - Attempt to fix regression found on recent release (#2006367)