diff options
-rw-r--r-- | libnm-core/nm-core-internal.h | 3 | ||||
-rw-r--r-- | libnm-core/nm-setting-bridge.c | 4 | ||||
-rw-r--r-- | src/devices/nm-device-bridge.c | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/libnm-core/nm-core-internal.h b/libnm-core/nm-core-internal.h index 1667159784..1f56e17043 100644 --- a/libnm-core/nm-core-internal.h +++ b/libnm-core/nm-core-internal.h @@ -103,6 +103,8 @@ #define NM_BRIDGE_MULTICAST_HASH_MAX_DEF 4096u #define NM_BRIDGE_MULTICAST_HASH_MAX_MAX ((guint) G_MAXUINT32) +#define NM_BRIDGE_STP_DEF TRUE + #define BRIDGE_HELLO_TIME_DEFAULT 2 #define BRIDGE_MAX_AGE_DEFAULT 20 #define BRIDGE_MULTICAST_LAST_MEMBER_COUNT_DEFAULT 2 @@ -117,7 +119,6 @@ #define BRIDGE_MULTICAST_STARTUP_QUERY_COUNT_DEFAULT 2 #define BRIDGE_MULTICAST_STARTUP_QUERY_INTERVAL_DEFAULT 3125 #define BRIDGE_PRIORITY_DEFAULT 0x8000 -#define BRIDGE_STP_DEFAULT TRUE #define BRIDGE_VLAN_DEFAULT_PVID_DEFAULT 1 #define BRIDGE_VLAN_STATS_ENABLED_DEFAULT FALSE diff --git a/libnm-core/nm-setting-bridge.c b/libnm-core/nm-setting-bridge.c index 1302eb9985..c832a22a6f 100644 --- a/libnm-core/nm-setting-bridge.c +++ b/libnm-core/nm-setting-bridge.c @@ -1579,7 +1579,7 @@ nm_setting_bridge_init (NMSettingBridge *setting) priv->multicast_hash_max = NM_BRIDGE_MULTICAST_HASH_MAX_DEF; priv->multicast_snooping = BRIDGE_MULTICAST_SNOOPING_DEFAULT; priv->priority = BRIDGE_PRIORITY_DEFAULT; - priv->stp = BRIDGE_STP_DEFAULT; + priv->stp = NM_BRIDGE_STP_DEF; priv->vlan_default_pvid = BRIDGE_VLAN_DEFAULT_PVID_DEFAULT; priv->vlan_stats_enabled = BRIDGE_VLAN_STATS_ENABLED_DEFAULT; priv->multicast_query_interval = BRIDGE_MULTICAST_QUERY_INTERVAL_DEFAULT; @@ -1684,7 +1684,7 @@ nm_setting_bridge_class_init (NMSettingBridgeClass *klass) */ obj_properties[PROP_STP] = g_param_spec_boolean (NM_SETTING_BRIDGE_STP, "", "", - BRIDGE_STP_DEFAULT, + NM_BRIDGE_STP_DEF, G_PARAM_READWRITE | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS); diff --git a/src/devices/nm-device-bridge.c b/src/devices/nm-device-bridge.c index 23a373d3aa..fa8a406c82 100644 --- a/src/devices/nm-device-bridge.c +++ b/src/devices/nm-device-bridge.c @@ -248,7 +248,7 @@ typedef struct { static const Option master_options[] = { { NM_SETTING_BRIDGE_STP, "stp_state", /* this must stay as the first item */ NULL, NULL, - 0, 1, 1, + FALSE, TRUE, NM_BRIDGE_STP_DEF, FALSE, FALSE, FALSE }, { NM_SETTING_BRIDGE_PRIORITY, "priority", NULL, NULL, |