From 5a70c03b7f598498625590b0b50d50242b522030 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 2 Sep 2020 10:49:44 +0200 Subject: [PATCH] Let avahi handle mdns requests We need to disable it by default in resolved so that it doesn't fight with avahi for the port when both are started up in parallel. I also moved nss-files before nss-resolve. This is unfortunate because resolved cached files and with the move, the file will be re-read on each query. Nevertheless, we want nss-files to have higher priority than nss-mdns to honour local config. Fortunately, only some people put lots of entries in /etc/hosts, so the inefficiency incurred by this isn't important for most users. nss-myhostname is moved after nss-files, following the change in upstream recommendations. --- systemd.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/systemd.spec b/systemd.spec index fe0f898..de9a7c7 100644 --- a/systemd.spec +++ b/systemd.spec @@ -385,7 +385,8 @@ CONFIGURE_OPTS=( -Dversion-tag=v%{version}-%{release} -Dfallback-hostname=fedora -Ddefault-dnssec=no - -Ddefault-mdns=resolve + # https://bugzilla.redhat.com/show_bug.cgi?id=1867830 + -Ddefault-mdns=no -Ddefault-llmnr=resolve ) @@ -660,7 +661,7 @@ function mod_nss() { # Add nss-resolve to hosts grep -E -q '^hosts:.* resolve' "$1" || sed -i.bak -r -e ' - s/^(hosts):(.*) files( mdns4_minimal .NOTFOUND=return.)? dns myhostname/\1:\2 resolve [!UNAVAIL=return] myhostname files\3 dns/ + s/^(hosts):(.*) files( mdns4_minimal .NOTFOUND=return.)? dns myhostname/\1:\2 files\3 resolve [!UNAVAIL=return] myhostname dns/ ' "$1" &>/dev/null || : fi } @@ -801,6 +802,8 @@ fi %changelog * Wed Sep 2 2020 Zbigniew Jędrzejewski-Szmek - 246.4-1 - Create /etc/resolv.conf symlink upon installation (#1873856) +- Move nss-mdns before nss-resolve in /etc/nsswitch.conf and disable + mdns by default in systemd-resolved (#1867830) * Wed Aug 26 2020 Zbigniew Jędrzejewski-Szmek - 246.3-1 - Update to bugfix version (some networkd fixes, minor documentation