]> sourceware.org Git - newlib-cygwin.git/commitdiff
Cygwin: resolver: Targets in SRV DNS responses may not be compressed
authorAnton Lavrentiev via Cygwin-patches <cygwin-patches@cygwin.com>
Tue, 18 Jan 2022 22:39:16 +0000 (17:39 -0500)
committerCorinna Vinschen <corinna@vinschen.de>
Wed, 19 Jan 2022 07:05:18 +0000 (08:05 +0100)
RFC2782 clearly says so yet it's a common misconception to perform the
compression in the violation of the standard.  This patch fixes that

winsup/cygwin/libc/minires-os-if.c

index 8d3178f700ef281fd06a7fe37ae3bb384e32b8b2..5da1c0c55b8caa8f07f92a1a4a47fdb463362359 100644 (file)
@@ -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:
This page took 0.031677 seconds and 5 git commands to generate.