From d3321f128b978c5e659343f4ec9d18476f3859b0 Mon Sep 17 00:00:00 2001 From: bz <bz@FreeBSD.org> Date: Tue, 4 Jun 2019 20:53:35 +0000 Subject: [PATCH] Rather than using the legacy IP struct fields in the union for the port number, properly access them by their IPv6 names. This will make it easier to slice up and compile out address families in the future. No functional change intended. MFC after: 6 weeks --- lib/libc/resolv/res_findzonecut.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libc/resolv/res_findzonecut.c b/lib/libc/resolv/res_findzonecut.c index 7e326f1a135c..d08f6dbe7dbd 100644 --- a/lib/libc/resolv/res_findzonecut.c +++ b/lib/libc/resolv/res_findzonecut.c @@ -629,7 +629,7 @@ save_a(res_state statp, ns_msg *msg, ns_sect sect, arr->addr.sin6.sin6_len = sizeof(arr->addr.sin6); #endif memcpy(&arr->addr.sin6.sin6_addr, ns_rr_rdata(rr), 16); - arr->addr.sin.sin_port = htons(NAMESERVER_PORT); + arr->addr.sin6.sin6_port = htons(NAMESERVER_PORT); nsrr->flags |= RR_NS_HAVE_V6; break; default: