mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-28 16:50:16 +01:00
libnm-util: only remove ARP when MIIMON is being set to non-zero and vice versa
miimon or arp_interval == 0 means 'disable'. So we should not remove options of one mode when the other mode is actually being disabled (set to zero).
This commit is contained in:
parent
0f88cb13f1
commit
6d2e033a0e
1 changed files with 4 additions and 2 deletions
|
|
@ -259,10 +259,12 @@ gboolean nm_setting_bond_add_option (NMSettingBond *setting,
|
|||
|
||||
g_hash_table_insert (priv->options, g_strdup (name), g_strdup (value));
|
||||
|
||||
if (!strcmp (name, NM_SETTING_BOND_OPTION_MIIMON)) {
|
||||
if ( !strcmp (name, NM_SETTING_BOND_OPTION_MIIMON)
|
||||
&& strcmp (value, "0") != 0) {
|
||||
g_hash_table_remove (priv->options, NM_SETTING_BOND_OPTION_ARP_INTERVAL);
|
||||
g_hash_table_remove (priv->options, NM_SETTING_BOND_OPTION_ARP_IP_TARGET);
|
||||
} else if (!strcmp (name, NM_SETTING_BOND_OPTION_ARP_INTERVAL)) {
|
||||
} else if ( !strcmp (name, NM_SETTING_BOND_OPTION_ARP_INTERVAL)
|
||||
&& strcmp (value, "0") != 0) {
|
||||
g_hash_table_remove (priv->options, NM_SETTING_BOND_OPTION_MIIMON);
|
||||
g_hash_table_remove (priv->options, NM_SETTING_BOND_OPTION_DOWNDELAY);
|
||||
g_hash_table_remove (priv->options, NM_SETTING_BOND_OPTION_UPDELAY);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue