resolved: when following a CNAME, turn off search domains
authorLennart Poettering <lennart@poettering.net>
Mon, 18 Jan 2016 20:31:16 +0000 (21:31 +0100)
committerLennart Poettering <lennart@poettering.net>
Mon, 18 Jan 2016 22:31:16 +0000 (23:31 +0100)
If the first step was done via a search domain, make sure the subsequent steps are not.

src/resolve/resolved-dns-query.c

index 49d1b23..2938238 100644 (file)
@@ -1242,6 +1242,9 @@ static int dns_query_cname_redirect(DnsQuery *q, const DnsResourceRecord *cname)
         dns_query_reset_answer(q);
         q->state = DNS_TRANSACTION_NULL;
 
+        /* Turn off searching for the new name */
+        q->flags |= SD_RESOLVED_NO_SEARCH;
+
         return 0;
 }