resolved: before assuming we have a server, check we are talking DNS and not LLMNR/mDNS

This commit is contained in:
Lennart Poettering 2018-12-04 20:53:14 +01:00
parent 51bc63fef2
commit 199dda9c25
1 changed files with 3 additions and 1 deletions

View File

@ -628,7 +628,9 @@ static int dns_transaction_emit_tcp(DnsTransaction *t) {
fd = -1;
#if ENABLE_DNS_OVER_TLS
if (DNS_SERVER_FEATURE_LEVEL_IS_TLS(t->current_feature_level)) {
if (t->scope->protocol == DNS_PROTOCOL_DNS &&
DNS_SERVER_FEATURE_LEVEL_IS_TLS(t->current_feature_level)) {
assert(t->server);
r = dnstls_stream_connect_tls(s, t->server);
if (r < 0)