mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-28 02:50:10 +01:00
device: fix matching parent device by connection UUID
We must compare the UUID with the one on the *parent* device. Also, simplify the checks to only return TRUE at the end of function. Fixes:27c281ac5a('device: deduplicate match_parent()') https://bugzilla.redhat.com/show_bug.cgi?id=1716438 https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/176 (cherry picked from commit3c54b5eb2b) (cherry picked from commit591837d6f5)
This commit is contained in:
parent
ec6b243738
commit
3f54307650
1 changed files with 3 additions and 5 deletions
|
|
@ -5643,11 +5643,9 @@ nm_device_match_parent (NMDevice *self, const char *parent)
|
|||
* no connection active on the device or when a connection with
|
||||
* that UUID is active.
|
||||
*/
|
||||
connection = nm_device_get_applied_connection (self);
|
||||
if (!connection)
|
||||
return TRUE;
|
||||
|
||||
if (!nm_streq0 (parent, nm_connection_get_uuid (connection)))
|
||||
connection = nm_device_get_applied_connection (parent_device);
|
||||
if ( connection
|
||||
&& !nm_streq0 (parent, nm_connection_get_uuid (connection)))
|
||||
return FALSE;
|
||||
} else {
|
||||
/* Interface name */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue