From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2155) id 06C6B3857815; Wed, 19 Jan 2022 07:55:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 06C6B3857815 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: 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/master X-Git-Oldrev: 905f51d7978e09b8f21d7442c58751fdf775c637 X-Git-Newrev: 54f0590a661fc76036a524ca81b9d5375402c233 Message-Id: <20220119075548.06C6B3857815@sourceware.org> Date: Wed, 19 Jan 2022 07:55:48 +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:48 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3D54f0590a661= fc76036a524ca81b9d5375402c233 commit 54f0590a661fc76036a524ca81b9d5375402c233 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 8d3178f70..5da1c0c55 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: