]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
resolve: do not compress target names in SRV records
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 8 Aug 2018 05:30:40 +0000 (14:30 +0900)
committerLennart Poettering <lennart@poettering.net>
Wed, 8 Aug 2018 10:24:32 +0000 (12:24 +0200)
Fixes #9793.

src/resolve/resolved-dns-packet.c

index 2cc606f363d630da56bbb13bbd0afa1df7033f18..a1d5d49dd8f27b627d39d965e57d73c305f9a939 100644 (file)
@@ -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: