mDNS, passim + avahi

Hello,

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.

is it safe to remove it or it will break fwupd?

Thanks for your help!

It is a weak dependency, I just removed it and didn’t have any issues so far.

1 Like

Oh, interesting. Autostarting avahi-daemon without an user intervention is definitely not self-contained change, as F40 Change Proposal: Passim Peer-to-Peer Metadata (Self Contained) suggested.

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. :slight_smile:

1 Like

avahi is also a weak requirement of cups. And one of the cups sub-packages has it as a strong dependency.

avahi is used by cups to locate printers on the local network and possible auto-configure them.

You have two options for mDNS:

  1. Enable mDNS in systemd-resolved and disable avahi.

  2. Disable mDNS in systemd-resolved and enable avahi and install nss-mdns.

I meant passim, not avahi. Removing passim doesn’t uninstall avahi if there are other packages that depend on it.

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.

1 Like

Are you sure?

$ systemctl list-unit-files avahi\*
UNIT FILE            STATE   PRESET
avahi-daemon.service enabled enabled
avahi-daemon.socket  enabled enabled

2 unit files listed.
$

+1 it was auto-enabled for me.