]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
resolved: Add ifindex=0 support for BrowseServices to browse all mDNS interfaces...
authorLuca Boccassi <luca.boccassi@gmail.com>
Tue, 24 Feb 2026 11:53:47 +0000 (11:53 +0000)
committerGitHub <noreply@github.com>
Tue, 24 Feb 2026 11:53:47 +0000 (11:53 +0000)
With v259, resolved can be used to replace Avahi for mDNS service
discovery and announcement. One key difference in the API is that Avahi
by default browses on all available interfaces by passing a special
`AVAHI_IF_UNSPEC` (-1) interface index value. With this change, passing
ifindex value `0` can be used to achieve the same , so this will work:
```
# Browse on all available interfaces
varlinkctl call --more unix:/run/systemd/resolve/io.systemd.Resolve \
    io.systemd.Resolve.BrowseServices \
    '{"domain":"local","type":"_display._tcp","ifindex":0,"flags":0}'
```
Not having to iterate through all interfaces on the client side then
also makes it more straight forward to build a resolve-avahi-compat
library for painlessly replacing Avahi with systemd-resolved.

A PoC compat lib requiring this change is available at
https://github.com/LorbusChris/resolve-avahi-compat


Trivial merge