summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2020-09-10 09:40:19 +0200
committerThomas Haller <thaller@redhat.com>2020-09-10 22:09:58 +0200
commitb5041c14f4bc69c0a89e7320d4e84289579a5e09 (patch)
treeaef3f92bfe9322193fc784ca616e9509a961bf4d
parentcb3a73af92fe142b23d6a33cfb9c10061ac941d3 (diff)
downloadNetworkManager-b5041c14f4bc69c0a89e7320d4e84289579a5e09.tar.gz
tui: allow configuring "primary" bond option with "balance-{alb,tlb}"
-rw-r--r--clients/tui/nmt-page-bond.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/clients/tui/nmt-page-bond.c b/clients/tui/nmt-page-bond.c
index e92b9f6c26..51ed8356c5 100644
--- a/clients/tui/nmt-page-bond.c
+++ b/clients/tui/nmt-page-bond.c
@@ -255,13 +255,16 @@ mode_widget_changed (GObject *object,
_bond_add_option (priv->s_bond, NM_SETTING_BOND_OPTION_MODE, mode);
priv->updating = FALSE;
- if (!strcmp (mode, "balance-tlb") || !strcmp (mode, "balance-alb")) {
+ if (NM_IN_STRSET (mode, "balance-tlb",
+ "balance-alb")) {
nmt_newt_popup_set_active (priv->monitoring, NMT_PAGE_BOND_MONITORING_MII);
nmt_newt_component_set_sensitive (NMT_NEWT_COMPONENT (priv->monitoring), FALSE);
} else
nmt_newt_component_set_sensitive (NMT_NEWT_COMPONENT (priv->monitoring), TRUE);
- if (!strcmp (mode, "active-backup")) {
+ if (NM_IN_STRSET (mode, "active-backup",
+ "balance-alb",
+ "balance-tlb")) {
nmt_newt_widget_set_visible (NMT_NEWT_WIDGET (priv->primary), TRUE);
_bond_add_option (priv->s_bond, NM_SETTING_BOND_OPTION_PRIMARY,
nmt_newt_entry_get_text (priv->primary));