core: move bridge port min/max/default values to core-internal
We have bridge min/max/default values in core-internal. Do the same for bridge port ones. We will soon use those values to enforce limits when assuming a bridge port configuration.
This commit is contained in:
@@ -101,6 +101,11 @@
|
||||
#define NM_BR_MIN_AGEING_TIME 0
|
||||
#define NM_BR_MAX_AGEING_TIME 1000000
|
||||
|
||||
#define NM_BR_PORT_MAX_PRIORITY 63
|
||||
#define NM_BR_PORT_DEF_PRIORITY 32
|
||||
|
||||
#define NM_BR_PORT_MAX_PATH_COST 65535
|
||||
|
||||
/* NM_SETTING_COMPARE_FLAG_INFERRABLE: check whether a device-generated
|
||||
* connection can be replaced by a already-defined connection. This flag only
|
||||
* takes into account properties marked with the %NM_SETTING_PARAM_INFERRABLE
|
||||
|
@@ -104,12 +104,6 @@ nm_setting_bridge_port_get_hairpin_mode (NMSettingBridgePort *setting)
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
#define BR_MAX_PORT_PRIORITY 63
|
||||
#define BR_DEF_PRIORITY 32
|
||||
|
||||
#define BR_MIN_PATH_COST 1
|
||||
#define BR_MAX_PATH_COST 65535
|
||||
|
||||
static gboolean
|
||||
verify (NMSetting *setting, NMConnection *connection, GError **error)
|
||||
{
|
||||
@@ -238,7 +232,7 @@ nm_setting_bridge_port_class_init (NMSettingBridgePortClass *klass)
|
||||
g_object_class_install_property
|
||||
(object_class, PROP_PRIORITY,
|
||||
g_param_spec_uint (NM_SETTING_BRIDGE_PORT_PRIORITY, "", "",
|
||||
0, BR_MAX_PORT_PRIORITY, BR_DEF_PRIORITY,
|
||||
0, NM_BR_PORT_MAX_PRIORITY, NM_BR_PORT_DEF_PRIORITY,
|
||||
G_PARAM_READWRITE |
|
||||
G_PARAM_CONSTRUCT |
|
||||
NM_SETTING_PARAM_INFERRABLE |
|
||||
@@ -261,7 +255,7 @@ nm_setting_bridge_port_class_init (NMSettingBridgePortClass *klass)
|
||||
g_object_class_install_property
|
||||
(object_class, PROP_PATH_COST,
|
||||
g_param_spec_uint (NM_SETTING_BRIDGE_PORT_PATH_COST, "", "",
|
||||
0, BR_MAX_PATH_COST, 100,
|
||||
0, NM_BR_PORT_MAX_PATH_COST, 100,
|
||||
G_PARAM_READWRITE |
|
||||
G_PARAM_CONSTRUCT |
|
||||
G_PARAM_STATIC_STRINGS));
|
||||
|
Reference in New Issue
Block a user