mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-03-26 01:50:39 +01:00
device: make device incompatible with profiles by default
Currently, NMDeviceWireguard does neither set connection_type_check_compatible nor implement check_connection_compatible. That means, it appears to be compatible with every connection profile, which is obviously wrong. Allow devices not to implement check_connection_compatible() and avoid the issue by rejecting profiles by default.
This commit is contained in:
parent
57cfc6f19d
commit
baa0008313
1 changed files with 8 additions and 0 deletions
|
|
@ -5596,6 +5596,14 @@ check_connection_compatible (NMDevice *self, NMConnection *connection, GError **
|
|||
klass->connection_type_check_compatible,
|
||||
error))
|
||||
return FALSE;
|
||||
} else if (klass->check_connection_compatible == check_connection_compatible) {
|
||||
/* the device class does not implement check_connection_compatible nor set
|
||||
* connection_type_check_compatible. That means, it is by default not compatible
|
||||
* with any connection type. */
|
||||
nm_utils_error_set_literal (error,
|
||||
NM_UTILS_ERROR_CONNECTION_AVAILABLE_INCOMPATIBLE,
|
||||
"device does not support any connections");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
conn_iface = nm_manager_get_connection_iface (nm_manager_get (),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue