dns: use dns-priority to provide a preprocessed domain list to plugins

System Internals / NetworkManager - Beniamino Galvani [redhat.com] - 14 May 2018 13:22 EDT

Do some preprocessing on the DNS configuration sent to plugins:

- add the '~' default routing (lookup) domain to IP configurations with the default route or, when there is none, to all non-VPN IP configurations

- use the dns-priority to decide which connection to use in case multiple connections have the same domain

- consider a negative dns-priority value as a way to 'shadow' all subdomains from other connections

- compute reverse DNS domains

and add the resulting domain list to NMDnsIPConfigData so that split-DNS plugins can use that directly instead of reimplementing the same logic themselves.

dd1e671fe dns: use dns-priority to provide a preprocessed domain list to plugins
src/dns/nm-dns-dnsmasq.c | 1 +
src/dns/nm-dns-manager.c | 199 +++++++++++++++++++++++++++++++++++++++++++++++
src/dns/nm-dns-manager.h | 4 +
src/nm-ip4-config.h | 6 ++
4 files changed, 210 insertions(+)

Upstream: cgit.freedesktop.org


  • Share