mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-06-19 14:48:33 +02:00
core: suppress missing MAC address warning during connection matching
One of the connetions may not have a MAC address, so don't expect one.
This commit is contained in:
parent
bcb9f6c910
commit
e5ccc30e3c
1 changed files with 6 additions and 3 deletions
|
|
@ -798,7 +798,7 @@ check_connection_mac_address (NMConnection *orig,
|
|||
GHashTable *settings)
|
||||
{
|
||||
GHashTable *props;
|
||||
const GByteArray *orig_mac, *cand_mac;
|
||||
const GByteArray *orig_mac = NULL, *cand_mac = NULL;
|
||||
NMSettingWired *s_wired_orig, *s_wired_cand;
|
||||
|
||||
props = check_property_in_hash (settings,
|
||||
|
|
@ -809,9 +809,12 @@ check_connection_mac_address (NMConnection *orig,
|
|||
|
||||
/* If one of the MAC addresses is NULL, we accept that connection */
|
||||
s_wired_orig = nm_connection_get_setting_wired (orig);
|
||||
if (s_wired_orig)
|
||||
orig_mac = nm_setting_wired_get_mac_address (s_wired_orig);
|
||||
|
||||
s_wired_cand = nm_connection_get_setting_wired (candidate);
|
||||
orig_mac = nm_setting_wired_get_mac_address (s_wired_orig);
|
||||
cand_mac = nm_setting_wired_get_mac_address (s_wired_cand);
|
||||
if (s_wired_cand)
|
||||
cand_mac = nm_setting_wired_get_mac_address (s_wired_cand);
|
||||
|
||||
if (!orig_mac || !cand_mac) {
|
||||
remove_from_hash (settings, props,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue