public inbox for cygwin-patches@cygwin.com
 help / color / mirror / Atom feed
From: Anton Lavrentiev <lavr@ncbi.nlm.nih.gov>
To: cygwin-patches@cygwin.com
Subject: [PATCH 2/2] Cygwin: resolver: Targets in SRV DNS responses may not be compressed
Date: Tue, 18 Jan 2022 17:39:16 -0500	[thread overview]
Message-ID: <20220118223916.43814-3-lavr@ncbi.nlm.nih.gov> (raw)
In-Reply-To: <20220118223916.43814-1-lavr@ncbi.nlm.nih.gov>

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 | 1 +
 1 file changed, 1 insertion(+)

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:
-- 
2.33.0


      parent reply	other threads:[~2022-01-18 22:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-18 22:39 Cygwin: resolver: more fixes Anton Lavrentiev
2022-01-18 22:39 ` [PATCH 1/2] Cygwin: resolver: Fix to match response ID with request ID Anton Lavrentiev
2022-01-18 22:39 ` Anton Lavrentiev [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220118223916.43814-3-lavr@ncbi.nlm.nih.gov \
    --to=lavr@ncbi.nlm.nih.gov \
    --cc=cygwin-patches@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).