mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-05 01:47:58 +02:00
device: honor the match.path property
This commit is contained in:
parent
808e837149
commit
d90c7b70f3
1 changed files with 8 additions and 0 deletions
|
|
@ -6295,6 +6295,7 @@ nm_device_match_parent_hwaddr (NMDevice *device,
|
|||
static gboolean
|
||||
check_connection_compatible (NMDevice *self, NMConnection *connection, GError **error)
|
||||
{
|
||||
NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
|
||||
const char *device_iface = nm_device_get_iface (self);
|
||||
gs_free_error GError *local = NULL;
|
||||
gs_free char *conn_iface = NULL;
|
||||
|
|
@ -6439,6 +6440,13 @@ check_connection_compatible (NMDevice *self, NMConnection *connection, GError **
|
|||
"device does not satisfy match.driver property");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
patterns = nm_setting_match_get_paths (s_match, &num_patterns);
|
||||
if (!nm_wildcard_match_check (priv->path, patterns, num_patterns)) {
|
||||
nm_utils_error_set_literal (error, NM_UTILS_ERROR_CONNECTION_AVAILABLE_INCOMPATIBLE,
|
||||
"device does not satisfy match.path property");
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue