mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-07 17:10:21 +01:00
libnm-glib: fix nm_device_check_connection_compatible()
Set the GError when nm_device_check_connection_compatible() fails because of interface_name mismatch.
This commit is contained in:
parent
6fac44b872
commit
1fcb9d6de4
1 changed files with 5 additions and 1 deletions
|
|
@ -1463,8 +1463,12 @@ check_connection_compatible (NMDevice *device,
|
|||
|
||||
config_iface = nm_setting_connection_get_interface_name (s_con);
|
||||
device_iface = nm_device_get_iface (device);
|
||||
if (config_iface && strcmp (config_iface, device_iface) != 0)
|
||||
if (config_iface && strcmp (config_iface, device_iface) != 0) {
|
||||
g_set_error (error,
|
||||
NM_DEVICE_ERROR, NM_DEVICE_ERROR_CONNECTION_INVALID,
|
||||
"The connection is not valid for this interface.");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue