1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +03:00

lib/addns: match additional names in a non case insensitive way

Sometime proxy dns servers mess up the case of parts of the
name...

So we should match with strequal() instead of strcmp(),
which results in much less dns packets on the wire...

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Sun Sep 29 08:09:46 UTC 2024 on atb-devel-224
This commit is contained in:
Stefan Metzmacher 2024-09-26 14:47:26 +02:00 committed by Volker Lendecke
parent 628d7b6f2e
commit 7d255e5c23

View File

@ -151,7 +151,11 @@ static void ads_dns_lookup_srv_done(struct tevent_req *subreq)
struct dns_rr_srv *srv = &state->srvs[j];
struct sockaddr_storage *tmp;
if (strcmp(srv->hostname, ar->name) != 0) {
/*
* sometimes the name gets messed up
* with upper and lower case...
*/
if (!strequal(srv->hostname, ar->name)) {
continue;
}
/* uint16_t can't wrap here. */