From 7fa2336da74bd69198144d5f119eadddffcf80c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=8D=C3=B1igo=20Huguet?= Date: Tue, 31 Oct 2023 13:58:34 +0100 Subject: [PATCH] auto-default: honor systemd's udev property ID_NET_AUTO_LINK_LOCAL_ONLY This property has the same meaning than ours NM_AUTO_DEFAULT_LINK_LOCAL_ONLY. It is a good idea to check for it because systemd will flag with it a higher number of devices, and we might consider it as the new "standard" at least for systemd based distros. See https://github.com/systemd/systemd/pull/29767. Maintain NM_AUTO_DEFAULT_LINK_LOCAL_ONLY for compatibility reasons, and give it precedence over the systemd one. It is specific to NM and users could add it to overwrite a systemd's default without having to modify systemd files. --- src/core/devices/nm-device.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/devices/nm-device.c b/src/core/devices/nm-device.c index c3886b7db0..605f837db2 100644 --- a/src/core/devices/nm-device.c +++ b/src/core/devices/nm-device.c @@ -8112,6 +8112,7 @@ apply_udev_auto_default_configs(NMDevice *self, NMConnection *connection) return; uprop = udev_device_get_property_value(dev, "NM_AUTO_DEFAULT_LINK_LOCAL_ONLY"); + uprop = uprop ?: udev_device_get_property_value(dev, "ID_NET_AUTO_LINK_LOCAL_ONLY"); if (_nm_utils_ascii_str_to_bool(uprop, FALSE)) { setting = nm_setting_ip4_config_new();