From owner-svn-src-all@freebsd.org Tue Jun 4 20:53:36 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B3B2C15BD1A7; Tue, 4 Jun 2019 20:53:36 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4E2B285BD6; Tue, 4 Jun 2019 20:53:36 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 23CF422E8E; Tue, 4 Jun 2019 20:53:36 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x54KraRL010089; Tue, 4 Jun 2019 20:53:36 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x54KraoE010088; Tue, 4 Jun 2019 20:53:36 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201906042053.x54KraoE010088@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Tue, 4 Jun 2019 20:53:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348671 - head/lib/libc/resolv X-SVN-Group: head X-SVN-Commit-Author: bz X-SVN-Commit-Paths: head/lib/libc/resolv X-SVN-Commit-Revision: 348671 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4E2B285BD6 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.972,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Jun 2019 20:53:36 -0000 Author: bz Date: Tue Jun 4 20:53:35 2019 New Revision: 348671 URL: https://svnweb.freebsd.org/changeset/base/348671 Log: 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 Modified: head/lib/libc/resolv/res_findzonecut.c Modified: head/lib/libc/resolv/res_findzonecut.c ============================================================================== --- head/lib/libc/resolv/res_findzonecut.c Tue Jun 4 20:37:00 2019 (r348670) +++ head/lib/libc/resolv/res_findzonecut.c Tue Jun 4 20:53:35 2019 (r348671) @@ -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: