When updating to Fedora 40, I started to have mDNS issues. I used mDNS via systemd-resolved in F39, but in F40, avahi is started by default. After some research, I found out that it is because F40 ships with passim by deafult.
Passim is good idea but I don’t have any use for it in my setup and I am not a fan it’s opening a port to share files. It seems to be a dependency from fwupd and it’s a static systemd unit so I cannot just disable it.
While I think there should be working interaction involved between avahi-daemon and systemd-resolved, I find it quite surprising avahi were started by default. I admit I failed to notice this change earlier. Auto-enabling mdns is fine on trusted networks, but definitely not on all networks altogether. Especially if they share important system files, like firmware updates. Not when user never specified he desires to interact with other devices on this specific network.
Anyway, passim has own service file and it should be enough to systemctl disable passim. Uninstall should be fine too. systemctl mask avahi-daemon should ensure avahi won’t start under no circumstance, even if passim would like it.
Or just disable mdns in systemd-resolved and try avahi instead.
But avahi-daemon.service is not auto-enabled by default. It should not start without any auto-enabled dependency. It expects user desiring it up to enable it. That means after removing passim and rebooting, it should stay installed, but not started.