mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-05 16:58:02 +02:00
keyfile: fix reading bonding options (bgo #701527)
Bonding options are written straight into [bond] group like: [bond] interface-name=bbb mode-active-backup miimon=300 So we have to handle them explicitly.
This commit is contained in:
parent
236155d9c9
commit
01585d2ebe
1 changed files with 8 additions and 0 deletions
|
|
@ -580,6 +580,10 @@ read_hash_of_string (GKeyFile *file, NMSetting *setting, const char *key)
|
||||||
if (strcmp (*iter, NM_SETTING_VPN_SERVICE_TYPE))
|
if (strcmp (*iter, NM_SETTING_VPN_SERVICE_TYPE))
|
||||||
nm_setting_vpn_add_data_item (NM_SETTING_VPN (setting), *iter, value);
|
nm_setting_vpn_add_data_item (NM_SETTING_VPN (setting), *iter, value);
|
||||||
}
|
}
|
||||||
|
if (NM_IS_SETTING_BOND (setting)) {
|
||||||
|
if (strcmp (*iter, NM_SETTING_BOND_INTERFACE_NAME))
|
||||||
|
nm_setting_bond_add_option (NM_SETTING_BOND (setting), *iter, value);
|
||||||
|
}
|
||||||
g_free (value);
|
g_free (value);
|
||||||
}
|
}
|
||||||
g_strfreev (keys);
|
g_strfreev (keys);
|
||||||
|
|
@ -988,6 +992,10 @@ read_one_setting_value (NMSetting *setting,
|
||||||
if (NM_IS_SETTING_VPN (setting))
|
if (NM_IS_SETTING_VPN (setting))
|
||||||
check_for_key = FALSE;
|
check_for_key = FALSE;
|
||||||
|
|
||||||
|
/* Bonding 'options' don't have the exact key name. The options are right under [bond] group. */
|
||||||
|
if (NM_IS_SETTING_BOND (setting))
|
||||||
|
check_for_key = FALSE;
|
||||||
|
|
||||||
/* Check for the exact key in the GKeyFile if required. Most setting
|
/* Check for the exact key in the GKeyFile if required. Most setting
|
||||||
* properties map 1:1 to a key in the GKeyFile, but for those properties
|
* properties map 1:1 to a key in the GKeyFile, but for those properties
|
||||||
* like IP addresses and routes where more than one value is actually
|
* like IP addresses and routes where more than one value is actually
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue