Commit e5ccc30e authored by Dan Williams's avatar Dan Williams

core: suppress missing MAC address warning during connection matching

One of the connetions may not have a MAC address, so don't expect one.
parent bcb9f6c9
......@@ -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,
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment