34 lines
1.0 KiB
Diff
34 lines
1.0 KiB
Diff
|
From 6ad1f6f44e77619eeb1f9f16e205c24a1dc3e68b Mon Sep 17 00:00:00 2001
|
||
|
From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= <pemensik@redhat.com>
|
||
|
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 <pemensik@redhat.com>
|
||
|
---
|
||
|
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
|
||
|
|