diff options
author | Lennart Poettering <lennart@poettering.net> | 2024-03-05 10:35:40 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2024-03-05 15:31:26 +0100 |
commit | 4b91896226b4285da94aad4b38b670036c7f23be (patch) | |
tree | ee5dafc33ba3d85ab6f28a0f941f689d1a49a127 /src/resolve | |
parent | resolved: rename variable found_{a|aaaa} → question_for_{a|aaaa} (diff) | |
download | systemd-4b91896226b4285da94aad4b38b670036c7f23be.tar.xz systemd-4b91896226b4285da94aad4b38b670036c7f23be.zip |
resolved: make outselves authoritative for /etc/hosts entries in full
If you query for an MX RR of a host listed in /etc/hosts, let's return
an empty reply rather than NXDOMAIN, i.e. indicate that the name exists
but has no MX RR assigned, thus making ourselves authoritative.
The venerable "host" tool by default sends requests for A + AAAA + MX
and ensures we never propagate queries further on.
Fixes: #31223
Diffstat (limited to 'src/resolve')
-rw-r--r-- | src/resolve/resolved-etc-hosts.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/resolve/resolved-etc-hosts.c b/src/resolve/resolved-etc-hosts.c index bd129cd2ca..2d334d38dd 100644 --- a/src/resolve/resolved-etc-hosts.c +++ b/src/resolve/resolved-etc-hosts.c @@ -560,7 +560,7 @@ static int etc_hosts_lookup_by_name( return r; } - return question_for_a || question_for_aaaa; + return true; /* We consider ourselves authoritative for the whole name, all RR types, not just A/AAAA */ } int manager_etc_hosts_lookup(Manager *m, DnsQuestion *q, DnsAnswer **answer) { |