mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-08 20:38:10 +02: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
|
* no connection active on the device or when a connection with
|
||||||
* that UUID is active.
|
* that UUID is active.
|
||||||
*/
|
*/
|
||||||
connection = nm_device_get_applied_connection (self);
|
connection = nm_device_get_applied_connection (parent_device);
|
||||||
if (!connection)
|
if ( connection
|
||||||
return TRUE;
|
&& !nm_streq0 (parent, nm_connection_get_uuid (connection)))
|
||||||
|
|
||||||
if (!nm_streq0 (parent, nm_connection_get_uuid (connection)))
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
} else {
|
} else {
|
||||||
/* Interface name */
|
/* Interface name */
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue