diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2022-02-02 09:35:36 +0100 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2022-02-03 09:16:39 +0100 |
commit | b2e1bd44362a5cdaa361414a95b2ad5048116cd5 (patch) | |
tree | 6b7c6214788d0f93d8e51a6bcfa2d13b825a0aec | |
parent | dc1092e22b2500233c22ec197191114e5d885256 (diff) | |
download | NetworkManager-b2e1bd44362a5cdaa361414a95b2ad5048116cd5.tar.gz |
device: remove unused if branch in device_link_changed()
nm_device_set_unmanaged_by_user_settings() does nothing when the
device is unmanaged by platform-init. Remove the if branch to make
this more explicit.
-rw-r--r-- | src/core/devices/nm-device.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/devices/nm-device.c b/src/core/devices/nm-device.c index a39aec16fb..bcf744f890 100644 --- a/src/core/devices/nm-device.c +++ b/src/core/devices/nm-device.c @@ -6459,10 +6459,11 @@ device_link_changed(gpointer user_data) /* If the device has no explicit ip_iface, then changing iface changes ip_iface too. */ ip_ifname_changed = !priv->ip_iface; - if (nm_device_get_unmanaged_flags(self, NM_UNMANAGED_PLATFORM_INIT)) - nm_device_set_unmanaged_by_user_settings(self); - else + if (!nm_device_get_unmanaged_flags(self, NM_UNMANAGED_PLATFORM_INIT)) { + /* Since the interface name changed, we need to re-evaluate the + * user settings specs. */ update_unmanaged_specs = TRUE; + } _notify(self, PROP_IFACE); if (ip_ifname_changed) |