]> sourceware.org Git - glibc.git/commitdiff
resolv: Fix CNAME chaining in resolv/tst-resolv-ai_idn-common.c
authorFlorian Weimer <fweimer@redhat.com>
Fri, 7 Feb 2020 17:48:04 +0000 (18:48 +0100)
committerFlorian Weimer <fweimer@redhat.com>
Fri, 7 Feb 2020 17:48:04 +0000 (18:48 +0100)
The second CNAME record optionally generated by the response function
used the question name, not the redirected name from the first CNAME.
This breaks the chain and results in failures of these IDNA tests if
CNAME owner names are checked as expected (which the current
implementation does not do).

resolv/tst-resolv-ai_idn-common.c

index 9e8ed7611c60e330e8c2ef724cbc2aae2051bb93..97eb617cfa6f999e9fd313e4a9a745ed8e431b62 100644 (file)
@@ -219,8 +219,9 @@ response (const struct resolv_response_context *ctx,
     }
   if (with_idn_cname)
     {
+      const char *previous_name = next_name;
       next_name = ANDERES_NAEMCHEN_IDNA ".example";
-      resolv_response_open_record (b, qname, C_IN, T_CNAME, 0);
+      resolv_response_open_record (b, previous_name, C_IN, T_CNAME, 0);
       resolv_response_add_name (b, next_name);
       resolv_response_close_record (b);
     }
This page took 0.038742 seconds and 5 git commands to generate.