From b2776a60f371de0cefd4141a68ada8f594f14560 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Wed, 8 Aug 2018 14:30:40 +0900 Subject: [PATCH] resolve: do not compress target names in SRV records Fixes #9793. --- src/resolve/resolved-dns-packet.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/resolve/resolved-dns-packet.c b/src/resolve/resolved-dns-packet.c index 2cc606f..a1d5d49 100644 --- a/src/resolve/resolved-dns-packet.c +++ b/src/resolve/resolved-dns-packet.c @@ -852,7 +852,9 @@ int dns_packet_append_rr(DnsPacket *p, const DnsResourceRecord *rr, const DnsAns if (r < 0) goto fail; - r = dns_packet_append_name(p, rr->srv.name, true, false, NULL); + /* RFC 2782 states "Unless and until permitted by future standards + * action, name compression is not to be used for this field." */ + r = dns_packet_append_name(p, rr->srv.name, false, false, NULL); break; case DNS_TYPE_PTR: -- 2.7.4