mailing list of musl libc
 help / color / mirror / code / Atom feed
* [musl] [PATCH] dns: use loop index i instead of nns in res_msend IPv6 nameserver check
@ 2026-03-01  1:25 Weixie Cui
  0 siblings, 0 replies; only message in thread
From: Weixie Cui @ 2026-03-01  1:25 UTC (permalink / raw)
  To: musl; +Cc: Weixie Cui

From: Weixie Cui <cuiweixie@gmail.com>

Signed-off-by: Weixie Cui <cuiweixie@gmail.com>
---
 src/network/res_msend.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/network/res_msend.c b/src/network/res_msend.c
index fcb52513..51d42ecb 100644
--- a/src/network/res_msend.c
+++ b/src/network/res_msend.c
@@ -124,7 +124,7 @@ int __res_msend_rc(int nqueries, const unsigned char *const *queries,
 
 	/* Handle case where system lacks IPv6 support */
 	if (fd < 0 && family == AF_INET6 && errno == EAFNOSUPPORT) {
-		for (i=0; i<nns && conf->ns[nns].family == AF_INET6; i++);
+		for (i=0; i<nns && conf->ns[i].family == AF_INET6; i++);
 		if (i==nns) {
 			pthread_setcancelstate(cs, 0);
 			return -1;
-- 
2.39.5 (Apple Git-154)


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-03-01  1:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-01  1:25 [musl] [PATCH] dns: use loop index i instead of nns in res_msend IPv6 nameserver check Weixie Cui

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).