libnm: adjust bridge defines NM_BRIDGE_PRIORITY_*

This commit is contained in:
Thomas Haller
2020-05-05 11:47:41 +02:00
parent e2cb0837cc
commit a690cedcba
3 changed files with 7 additions and 4 deletions

View File

@@ -107,6 +107,10 @@
#define NM_BRIDGE_STP_DEF TRUE
#define NM_BRIDGE_PRIORITY_MIN 0u
#define NM_BRIDGE_PRIORITY_DEF 0x8000u
#define NM_BRIDGE_PRIORITY_MAX ((guint) G_MAXUINT16)
#define BRIDGE_MULTICAST_LAST_MEMBER_COUNT_DEFAULT 2
#define BRIDGE_MULTICAST_LAST_MEMBER_INTERVAL_DEFAULT 100
#define BRIDGE_MULTICAST_MEMBERSHIP_INTERVAL_DEFAULT 26000
@@ -118,7 +122,6 @@
#define BRIDGE_MULTICAST_SNOOPING_DEFAULT TRUE
#define BRIDGE_MULTICAST_STARTUP_QUERY_COUNT_DEFAULT 2
#define BRIDGE_MULTICAST_STARTUP_QUERY_INTERVAL_DEFAULT 3125
#define BRIDGE_PRIORITY_DEFAULT 0x8000
#define BRIDGE_VLAN_DEFAULT_PVID_DEFAULT 1
#define BRIDGE_VLAN_STATS_ENABLED_DEFAULT FALSE

View File

@@ -1578,7 +1578,7 @@ nm_setting_bridge_init (NMSettingBridge *setting)
priv->multicast_membership_interval = BRIDGE_MULTICAST_MEMBERSHIP_INTERVAL_DEFAULT;
priv->multicast_hash_max = NM_BRIDGE_MULTICAST_HASH_MAX_DEF;
priv->multicast_snooping = BRIDGE_MULTICAST_SNOOPING_DEFAULT;
priv->priority = BRIDGE_PRIORITY_DEFAULT;
priv->priority = NM_BRIDGE_PRIORITY_DEF;
priv->stp = NM_BRIDGE_STP_DEF;
priv->vlan_default_pvid = BRIDGE_VLAN_DEFAULT_PVID_DEFAULT;
priv->vlan_stats_enabled = BRIDGE_VLAN_STATS_ENABLED_DEFAULT;
@@ -1706,7 +1706,7 @@ nm_setting_bridge_class_init (NMSettingBridgeClass *klass)
*/
obj_properties[PROP_PRIORITY] =
g_param_spec_uint (NM_SETTING_BRIDGE_PRIORITY, "", "",
0, G_MAXUINT16, BRIDGE_PRIORITY_DEFAULT,
NM_BRIDGE_PRIORITY_MIN, NM_BRIDGE_PRIORITY_MAX, NM_BRIDGE_PRIORITY_DEF,
G_PARAM_READWRITE |
NM_SETTING_PARAM_INFERRABLE |
G_PARAM_STATIC_STRINGS);

View File

@@ -252,7 +252,7 @@ static const Option master_options[] = {
FALSE, FALSE, FALSE },
{ NM_SETTING_BRIDGE_PRIORITY, "priority",
NULL, NULL,
0, G_MAXUINT16, 0x8000,
NM_BRIDGE_PRIORITY_MIN, NM_BRIDGE_PRIORITY_MAX, NM_BRIDGE_PRIORITY_DEF,
TRUE, FALSE, TRUE },
{ NM_SETTING_BRIDGE_FORWARD_DELAY, "forward_delay",
NULL, NULL,