mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-09 22:30:30 +01:00
We now always use SetLinkDefaultRoute(), but that API was only added in systemd v240 ([1]). We could just always call the non-existing method, and ignore the error. However, that feels ugly. Would systemd-resolved log warnings about that? Should we suppress all messages about that failure (not good for debugging). Instead, make an effort to detect support of the function, and avoid calling it. That is significantly more complicated than just always calling the method and not care. Note that even if systemd-resolved does not support SetLinkDefaultRoute(), we cannot do anything smart about that. We would simply rely on systemd-resolved (hopefully) doing the right thing automatically. That's better and simpler than explicitly adding a "~." domain in the fallback case. Also, detecting support is straight forward in the common case, where there is either success or a clear "org.freedesktop.DBus.Error.UnknownMethod" error. In cases where there is any other failure, we don't really know. In that case, we keep trying to use the API under the assumption that it should work. [1] https://github.com/systemd/systemd/commit/7 ## 7673795dcf5797491e7f785cbf5077d29a15db4 |
||
|---|---|---|
| .. | ||
| nm-dns-dnsmasq.c | ||
| nm-dns-dnsmasq.h | ||
| nm-dns-manager.c | ||
| nm-dns-manager.h | ||
| nm-dns-plugin.c | ||
| nm-dns-plugin.h | ||
| nm-dns-systemd-resolved.c | ||
| nm-dns-systemd-resolved.h | ||
| nm-dns-unbound.c | ||
| nm-dns-unbound.h | ||