mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-07-22 02:35:25 +00:00
keyfile: fix interpreting missing wifi.mac-address-randomization as permanent address
With commit 4f6c91d696
, we aimed to
enable mac-address-randomization by default for Wi-Fi. That however
is not possible by default because it breaks various scenarios.
Also, later wifi.mac-address-randomization was deprecated in favor
of wifi.cloned-mac-address setting.
Both wifi.mac-address-randomization and wifi.cloned-mac-address support
global default values, so it is wrong to read a missing
mac-address-randomization as "NEVER" -- which due to
normalization also results in cloned-mac-address=permanent.
This commit is contained in:
parent
dea3c49ce2
commit
46d53e1101
|
@ -1376,11 +1376,6 @@ static void
|
|||
set_default_for_missing_key (NMSetting *setting, const char *property)
|
||||
{
|
||||
/* Set a value different from the default value of the property's spec */
|
||||
|
||||
if (NM_IS_SETTING_WIRELESS (setting)) {
|
||||
if (!strcmp (property, NM_SETTING_WIRELESS_MAC_ADDRESS_RANDOMIZATION))
|
||||
g_object_set (setting, property, (NMSettingMacRandomization) NM_SETTING_MAC_RANDOMIZATION_NEVER, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -638,9 +638,6 @@ can_omit_default_value (NMSetting *setting, const char *property)
|
|||
} else if (NM_IS_SETTING_IP6_CONFIG (setting)) {
|
||||
if (!strcmp (property, NM_SETTING_IP6_CONFIG_ADDR_GEN_MODE))
|
||||
return FALSE;
|
||||
} else if (NM_IS_SETTING_WIRELESS (setting)) {
|
||||
if (!strcmp (property, NM_SETTING_WIRELESS_MAC_ADDRESS_RANDOMIZATION))
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
|
Loading…
Reference in a new issue