From: Anton Lavrentiev via Cygwin-patches Date: Tue, 18 Jan 2022 22:39:16 +0000 (-0500) Subject: Cygwin: resolver: Targets in SRV DNS responses may not be compressed X-Git-Tag: cygwin-3.4.0~707 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=54f0590a661fc76036a524ca81b9d5375402c233;p=newlib-cygwin.git Cygwin: resolver: Targets in SRV DNS responses may not be compressed 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 --git a/winsup/cygwin/libc/minires-os-if.c b/winsup/cygwin/libc/minires-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 = 0; /* compression not allowed */ PUTDOMAIN(rr->Data.SRV.pNameTarget, ptr); break; default: