libnm: adjust bridge defines NM_BRIDGE_PORT_PRIORITY_*

This commit is contained in:
Thomas Haller 2020-05-05 11:53:18 +02:00
parent a690cedcba
commit a7421f8bf2
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728
3 changed files with 6 additions and 5 deletions

View file

@ -95,8 +95,9 @@
#define NM_BRIDGE_AGEING_TIME_DEF 300u
#define NM_BRIDGE_AGEING_TIME_MAX 1000000u
#define NM_BR_PORT_MAX_PRIORITY 63
#define NM_BR_PORT_DEF_PRIORITY 32
#define NM_BRIDGE_PORT_PRIORITY_MIN 0u
#define NM_BRIDGE_PORT_PRIORITY_DEF 32u
#define NM_BRIDGE_PORT_PRIORITY_MAX 63u
#define NM_BR_PORT_MAX_PATH_COST 65535
#define NM_BR_PORT_DEF_PATH_COST 100

View file

@ -442,7 +442,7 @@ nm_setting_bridge_port_init (NMSettingBridgePort *setting)
priv->vlans = g_ptr_array_new_with_free_func ((GDestroyNotify) nm_bridge_vlan_unref);
priv->priority = NM_BR_PORT_DEF_PRIORITY;
priv->priority = NM_BRIDGE_PORT_PRIORITY_DEF;
priv->path_cost = NM_BR_PORT_DEF_PATH_COST;
}
@ -500,7 +500,7 @@ nm_setting_bridge_port_class_init (NMSettingBridgePortClass *klass)
*/
obj_properties[PROP_PRIORITY] =
g_param_spec_uint (NM_SETTING_BRIDGE_PORT_PRIORITY, "", "",
0, NM_BR_PORT_MAX_PRIORITY, NM_BR_PORT_DEF_PRIORITY,
NM_BRIDGE_PORT_PRIORITY_MIN, NM_BRIDGE_PORT_PRIORITY_MAX, NM_BRIDGE_PORT_PRIORITY_DEF,
G_PARAM_READWRITE |
NM_SETTING_PARAM_INFERRABLE |
G_PARAM_STATIC_STRINGS);

View file

@ -344,7 +344,7 @@ static const Option master_options[] = {
static const Option slave_options[] = {
{ NM_SETTING_BRIDGE_PORT_PRIORITY, "priority",
NULL, NULL,
0, NM_BR_PORT_MAX_PRIORITY, NM_BR_PORT_DEF_PRIORITY,
NM_BRIDGE_PORT_PRIORITY_MIN, NM_BRIDGE_PORT_PRIORITY_MAX, NM_BRIDGE_PORT_PRIORITY_DEF,
TRUE, FALSE },
{ NM_SETTING_BRIDGE_PORT_PATH_COST, "path_cost",
NULL, NULL,