]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/resolve/resolved-dns-rr.c
resolved: rework synthesizing logic 1002/head
authorLennart Poettering <lennart@poettering.net>
Mon, 17 Aug 2015 21:54:08 +0000 (23:54 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 21 Aug 2015 10:41:08 +0000 (12:41 +0200)
commit78c6a153c47f8d597c827bdcaf8c4e42ac87f738
treec0b378f70987c6de3cbbcc02fd6cc2c6549d2a3a
parent8013e860b6344cb109e68208a3a91b0fc3cb9ed1
resolved: rework synthesizing logic

With this change we'll now also generate synthesized RRs for the local
LLMNR hostname (first label of system hostname), the local mDNS hostname
(first label of system hostname suffixed with .local), the "gateway"
hostname and all the reverse PTRs. This hence takes over part of what
nss-myhostname already implemented.

Local hostnames resolve to the set of local IP addresses. Since the
addresses are possibly on different interfaces it is necessary to change
the internal DnsAnswer object to track per-RR interface indexes, and to
change the bus API to always return the interface per-address rather than
per-reply. This change also patches  the existing clients for resolved
accordingly (nss-resolve + systemd-resolve-host).

This also changes the routing logic for queries slightly: we now ensure
that the local hostname is never resolved via LLMNR, thus making it
trustable on the local system.
16 files changed:
src/nss-resolve/nss-resolve.c
src/resolve-host/resolve-host.c
src/resolve/resolved-bus.c
src/resolve/resolved-dns-answer.c
src/resolve/resolved-dns-answer.h
src/resolve/resolved-dns-cache.c
src/resolve/resolved-dns-packet.c
src/resolve/resolved-dns-query.c
src/resolve/resolved-dns-query.h
src/resolve/resolved-dns-rr.c
src/resolve/resolved-dns-rr.h
src/resolve/resolved-dns-scope.c
src/resolve/resolved-dns-zone.c
src/resolve/resolved-link.c
src/resolve/resolved-manager.c
src/resolve/resolved-manager.h