Commit baa00083 authored by Thomas Haller's avatar Thomas Haller

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.
parent 57cfc6f1
......@@ -5596,6 +5596,14 @@ check_connection_compatible (NMDevice *self, NMConnection *connection, GError **
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,
"device does not support any connections");
return FALSE;
conn_iface = nm_manager_get_connection_iface (nm_manager_get (),
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment