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:
@@ -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,8 +809,11 @@ 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);
|
||||
s_wired_cand = nm_connection_get_setting_wired (candidate);
|
||||
if (s_wired_orig)
|
||||
orig_mac = nm_setting_wired_get_mac_address (s_wired_orig);
|
||||
|
||||
s_wired_cand = nm_connection_get_setting_wired (candidate);
|
||||
if (s_wired_cand)
|
||||
cand_mac = nm_setting_wired_get_mac_address (s_wired_cand);
|
||||
|
||||
if (!orig_mac || !cand_mac) {
|
||||
|
Reference in New Issue
Block a user