From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2155) id CE9DE3857820; Wed, 19 Jan 2022 07:55:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CE9DE3857820 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Corinna Vinschen To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin/cygwin-3_3-branch] Cygwin: resolver: Targets in SRV DNS responses may not be compressed X-Act-Checkin: newlib-cygwin X-Git-Author: Anton Lavrentiev via Cygwin-patches X-Git-Refname: refs/heads/cygwin-3_3-branch X-Git-Oldrev: 09f8c704f8bf7e2e806d90a22b8ab9e6cdd2d4a9 X-Git-Newrev: 7b1d4c732e474cfba0bcd91b812da90a7298c982 Message-Id: <20220119075517.CE9DE3857820@sourceware.org> Date: Wed, 19 Jan 2022 07:55:17 +0000 (GMT) X-BeenThere: cygwin-cvs@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin core component git logs List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Jan 2022 07:55:17 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3D7b1d4c732e4= 74cfba0bcd91b812da90a7298c982 commit 7b1d4c732e474cfba0bcd91b812da90a7298c982 Author: Anton Lavrentiev via Cygwin-patches Date: Tue Jan 18 17:39:16 2022 -0500 Cygwin: resolver: Targets in SRV DNS responses may not be compressed =20 RFC2782 clearly says so yet it's a common misconception to perform the compression in the violation of the standard. This patch fixes that Diff: --- winsup/cygwin/libc/minires-os-if.c | 1 + 1 file changed, 1 insertion(+) diff --git a/winsup/cygwin/libc/minires-os-if.c b/winsup/cygwin/libc/minire= s-os-if.c index 1dac816eb..dce856076 100644 --- a/winsup/cygwin/libc/minires-os-if.c +++ b/winsup/cygwin/libc/minires-os-if.c @@ -159,6 +159,7 @@ static unsigned char * write_record(unsigned char * ptr= , PDNS_RECORD rr, PUTSHORT(rr->Data.SRV.wWeight, ptr); PUTSHORT(rr->Data.SRV.wPort, ptr); } + dnptrs =3D 0; /* compression not allowed */ PUTDOMAIN(rr->Data.SRV.pNameTarget, ptr); break; default: