diff options
author | Thomas Haller <thaller@redhat.com> | 2020-05-05 11:53:18 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2020-05-08 08:02:49 +0200 |
commit | 4c3691e52e274855a2a9ce9b9ac2bcda1f16cf8c (patch) | |
tree | 5244211d429bcfa7620fefa9272432e79b418be1 | |
parent | a7421f8bf2f43efd669a61c79798b79f6c9f4946 (diff) | |
download | NetworkManager-4c3691e52e274855a2a9ce9b9ac2bcda1f16cf8c.tar.gz |
libnm: adjust bridge defines NM_BRIDGE_PORT_PATH_COST_*
-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 1c1e087d9e..83643b9ac7 100644 --- a/libnm-core/nm-core-internal.h +++ b/libnm-core/nm-core-internal.h @@ -99,8 +99,9 @@ #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 +#define NM_BRIDGE_PORT_PATH_COST_MIN 0u +#define NM_BRIDGE_PORT_PATH_COST_DEF 100u +#define NM_BRIDGE_PORT_PATH_COST_MAX 65535u #define NM_BRIDGE_MULTICAST_HASH_MAX_MIN 1u #define NM_BRIDGE_MULTICAST_HASH_MAX_DEF 4096u diff --git a/libnm-core/nm-setting-bridge-port.c b/libnm-core/nm-setting-bridge-port.c index 92c66e3edc..92ac28ecd2 100644 --- a/libnm-core/nm-setting-bridge-port.c +++ b/libnm-core/nm-setting-bridge-port.c @@ -443,7 +443,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_BRIDGE_PORT_PRIORITY_DEF; - priv->path_cost = NM_BR_PORT_DEF_PATH_COST; + priv->path_cost = NM_BRIDGE_PORT_PATH_COST_DEF; } /** @@ -521,7 +521,7 @@ nm_setting_bridge_port_class_init (NMSettingBridgePortClass *klass) */ obj_properties[PROP_PATH_COST] = g_param_spec_uint (NM_SETTING_BRIDGE_PORT_PATH_COST, "", "", - 0, NM_BR_PORT_MAX_PATH_COST, NM_BR_PORT_DEF_PATH_COST, + NM_BRIDGE_PORT_PATH_COST_MIN, NM_BRIDGE_PORT_PATH_COST_MAX, NM_BRIDGE_PORT_PATH_COST_DEF, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); diff --git a/src/devices/nm-device-bridge.c b/src/devices/nm-device-bridge.c index 85e2df1269..3e56d94286 100644 --- a/src/devices/nm-device-bridge.c +++ b/src/devices/nm-device-bridge.c @@ -348,7 +348,7 @@ static const Option slave_options[] = { TRUE, FALSE }, { NM_SETTING_BRIDGE_PORT_PATH_COST, "path_cost", NULL, NULL, - 0, NM_BR_PORT_MAX_PATH_COST, 100, + NM_BRIDGE_PORT_PATH_COST_MIN, NM_BRIDGE_PORT_PATH_COST_MAX, NM_BRIDGE_PORT_PATH_COST_DEF, TRUE, FALSE }, { NM_SETTING_BRIDGE_PORT_HAIRPIN_MODE, "hairpin_mode", NULL, NULL, |