mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-21 00:10:28 +01:00
bond: fix setting num_grat_arp option
'num_grat_arp' and 'num_unsol_na' are actually the same attribute on
kernel side, so if only 'num_grat_arp' is set in configuration, we
first write its value and then overwrite it with the 'num_unsol_na'
default value (1). Instead, just write one of the two option.
https://bugzilla.redhat.com/show_bug.cgi?id=1591734
(cherry picked from commit 42b0bef33c)
This commit is contained in:
parent
b32c03c879
commit
4c2e7b6d4d
1 changed files with 10 additions and 2 deletions
|
|
@ -338,8 +338,6 @@ apply_bonding_config (NMDevice *device)
|
|||
set_simple_option (device, mode, s_bond, NM_SETTING_BOND_OPTION_FAIL_OVER_MAC);
|
||||
set_simple_option (device, mode, s_bond, NM_SETTING_BOND_OPTION_LACP_RATE);
|
||||
set_simple_option (device, mode, s_bond, NM_SETTING_BOND_OPTION_LP_INTERVAL);
|
||||
set_simple_option (device, mode, s_bond, NM_SETTING_BOND_OPTION_NUM_GRAT_ARP);
|
||||
set_simple_option (device, mode, s_bond, NM_SETTING_BOND_OPTION_NUM_UNSOL_NA);
|
||||
set_simple_option (device, mode, s_bond, NM_SETTING_BOND_OPTION_MIN_LINKS);
|
||||
set_simple_option (device, mode, s_bond, NM_SETTING_BOND_OPTION_PACKETS_PER_SLAVE);
|
||||
set_simple_option (device, mode, s_bond, NM_SETTING_BOND_OPTION_PRIMARY_RESELECT);
|
||||
|
|
@ -348,6 +346,16 @@ apply_bonding_config (NMDevice *device)
|
|||
set_simple_option (device, mode, s_bond, NM_SETTING_BOND_OPTION_USE_CARRIER);
|
||||
set_simple_option (device, mode, s_bond, NM_SETTING_BOND_OPTION_XMIT_HASH_POLICY);
|
||||
|
||||
/* num_grat_arp and num_unsol_na are actually the same attribute
|
||||
* on kernel side and their value in the bond setting is guaranteed
|
||||
* to be equal. Write only one of the two.
|
||||
*/
|
||||
value = nm_setting_bond_get_option_by_name (s_bond, NM_SETTING_BOND_OPTION_NUM_GRAT_ARP);
|
||||
if (value)
|
||||
set_bond_attr (device, mode, NM_SETTING_BOND_OPTION_NUM_GRAT_ARP, value);
|
||||
else
|
||||
set_simple_option (device, mode, s_bond, NM_SETTING_BOND_OPTION_NUM_UNSOL_NA);
|
||||
|
||||
return NM_ACT_STAGE_RETURN_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue