diff options
| author | Thomas Haller <thaller@redhat.com> | 2020-06-08 19:34:50 +0200 |
|---|---|---|
| committer | Thomas Haller <thaller@redhat.com> | 2020-06-10 19:45:46 +0200 |
| commit | 96c9703b50cac9287daf04ca28e932ba6339d53d (patch) | |
| tree | 45fe799a7dd949c473f18bf5434ce391149ab7d8 /src/devices/nm-device.c | |
| parent | 0d1df36e5899303c4f593ed32c27c2547237f0be (diff) | |
| download | NetworkManager-96c9703b50cac9287daf04ca28e932ba6339d53d.tar.gz | |
core: add "external" flag for connections of external devices
When a device is not marked as unmanaged, but also not actively managed
by NetworkManager, then NetworkManager will generate an in-memory
profile to represent the active state, if the device is up and
configured (with an IP address).
Such profiles are commonly named like "eth0", and they are utterly
confusing to users, because they look as if NetworkManager actually
manages the device, when it really just shows that somebody else configures
the device.
We should express this better in the UI, hence add flags to indicate
that.
In practice, such profiles are UNSAVED, NM_GENERATED, and VOLATILE. But
add an explicit flag to represent that.
https://bugzilla.redhat.com/show_bug.cgi?id=1816202
Diffstat (limited to 'src/devices/nm-device.c')
| -rw-r--r-- | src/devices/nm-device.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index 30b16f449b..ef4b5cf8d0 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -13320,10 +13320,8 @@ nm_device_set_ip_config (NMDevice *self, if ( nm_device_sys_iface_state_is_external (self) && (settings_connection = nm_device_get_settings_connection (self)) - && NM_FLAGS_ALL (nm_settings_connection_get_flags (settings_connection), - NM_SETTINGS_CONNECTION_INT_FLAGS_UNSAVED - | NM_SETTINGS_CONNECTION_INT_FLAGS_VOLATILE - | NM_SETTINGS_CONNECTION_INT_FLAGS_NM_GENERATED) + && NM_FLAGS_HAS (nm_settings_connection_get_flags (settings_connection), + NM_SETTINGS_CONNECTION_INT_FLAGS_EXTERNAL) && nm_active_connection_get_activation_type (NM_ACTIVE_CONNECTION (priv->act_request.obj)) == NM_ACTIVATION_TYPE_EXTERNAL) { gs_unref_object NMConnection *new_connection = NULL; |
