diff options
-rw-r--r-- | libnm-core/nm-core-internal.h | 5 | ||||
-rw-r--r-- | libnm-core/nm-setting-bridge-port.c | 4 | ||||
-rw-r--r-- | src/devices/nm-device-bridge.c | 2 |
3 files changed, 6 insertions, 5 deletions
diff --git a/libnm-core/nm-core-internal.h b/libnm-core/nm-core-internal.h index 76ecd8f0e0..1c1e087d9e 100644 --- a/libnm-core/nm-core-internal.h +++ b/libnm-core/nm-core-internal.h @@ -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 diff --git a/libnm-core/nm-setting-bridge-port.c b/libnm-core/nm-setting-bridge-port.c index 72f37af572..92c66e3edc 100644 --- a/libnm-core/nm-setting-bridge-port.c +++ b/libnm-core/nm-setting-bridge-port.c @@ -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); diff --git a/src/devices/nm-device-bridge.c b/src/devices/nm-device-bridge.c index f32bd66264..85e2df1269 100644 --- a/src/devices/nm-device-bridge.c +++ b/src/devices/nm-device-bridge.c @@ -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, |