mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-06-10 16:08:27 +02:00
ethernet: fix complete_connection rejecting veth with correct peer
complete_connection() unconditionally rejects veth connections that
already have a peer name set, even when the peer name matches the
device's actual peer. Only reject when the names differ.
Fixes: 7c05ff1632 ('device: fix complete-connection for veth devices')
This commit is contained in:
parent
f5127d7b14
commit
fd037132e7
1 changed files with 7 additions and 5 deletions
|
|
@ -1684,11 +1684,13 @@ complete_connection(NMDevice *device,
|
|||
|
||||
con_peer_name = nm_setting_veth_get_peer(s_veth);
|
||||
if (con_peer_name) {
|
||||
nm_utils_error_set(error,
|
||||
NM_UTILS_ERROR_UNKNOWN,
|
||||
"mismatching veth peer \"%s\"",
|
||||
con_peer_name);
|
||||
return FALSE;
|
||||
if (!nm_streq(con_peer_name, peer_name)) {
|
||||
nm_utils_error_set(error,
|
||||
NM_UTILS_ERROR_UNKNOWN,
|
||||
"mismatching veth peer \"%s\"",
|
||||
con_peer_name);
|
||||
return FALSE;
|
||||
}
|
||||
} else
|
||||
g_object_set(s_veth, NM_SETTING_VETH_PEER, peer_name, NULL);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue