diff options
author | Thomas Haller <thaller@redhat.com> | 2020-05-05 13:26:30 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2020-05-08 08:02:51 +0200 |
commit | bfcfdc2955b2a9833aef3b539eb8b254f88e6203 (patch) | |
tree | ad80ad22889e41195af803b0b7f31688ef78ec0f | |
parent | f34144f70b0da2a03a90d5f27815fdd1d9b5be63 (diff) | |
download | NetworkManager-bfcfdc2955b2a9833aef3b539eb8b254f88e6203.tar.gz |
libnm: adjust bridge defines NM_BRIDGE_VLAN_STATS_ENABLED_DEF
-rw-r--r-- | libnm-core/nm-core-internal.h | 3 | ||||
-rw-r--r-- | libnm-core/nm-setting-bridge.c | 4 | ||||
-rw-r--r-- | src/devices/nm-device-bridge.c | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/libnm-core/nm-core-internal.h b/libnm-core/nm-core-internal.h index 1b4f8fd7ea..4fc6d913c4 100644 --- a/libnm-core/nm-core-internal.h +++ b/libnm-core/nm-core-internal.h @@ -151,8 +151,9 @@ #define NM_BRIDGE_MULTICAST_STARTUP_QUERY_INTERVAL_DEF ((guint64) 3125) #define NM_BRIDGE_MULTICAST_STARTUP_QUERY_INTERVAL_MAX G_MAXUINT64 +#define NM_BRIDGE_VLAN_STATS_ENABLED_DEF FALSE + #define BRIDGE_VLAN_DEFAULT_PVID_DEFAULT 1 -#define BRIDGE_VLAN_STATS_ENABLED_DEFAULT FALSE /* NM_SETTING_COMPARE_FLAG_INFERRABLE: check whether a device-generated * connection can be replaced by a already-defined connection. This flag only diff --git a/libnm-core/nm-setting-bridge.c b/libnm-core/nm-setting-bridge.c index dbd81a7d89..df34111e0d 100644 --- a/libnm-core/nm-setting-bridge.c +++ b/libnm-core/nm-setting-bridge.c @@ -1581,7 +1581,6 @@ nm_setting_bridge_init (NMSettingBridge *setting) 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; priv->multicast_query_interval = NM_BRIDGE_MULTICAST_QUERY_INTERVAL_DEF; priv->multicast_query_response_interval = NM_BRIDGE_MULTICAST_QUERY_RESPONSE_INTERVAL_DEF; priv->multicast_querier_interval = NM_BRIDGE_MULTICAST_QUERIER_INTERVAL_DEF; @@ -1590,6 +1589,7 @@ nm_setting_bridge_init (NMSettingBridge *setting) nm_assert (priv->multicast_querier == NM_BRIDGE_MULTICAST_QUERIER_DEF); nm_assert (priv->multicast_query_use_ifaddr == NM_BRIDGE_MULTICAST_QUERY_USE_IFADDR_DEF); + nm_assert (priv->vlan_stats_enabled == NM_BRIDGE_VLAN_STATS_ENABLED_DEF); } /** @@ -1991,7 +1991,7 @@ nm_setting_bridge_class_init (NMSettingBridgeClass *klass) */ obj_properties[PROP_VLAN_STATS_ENABLED] = g_param_spec_boolean (NM_SETTING_BRIDGE_VLAN_STATS_ENABLED, "", "", - BRIDGE_VLAN_STATS_ENABLED_DEFAULT, + NM_BRIDGE_VLAN_STATS_ENABLED_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 a963a0449d..0a8bc4f2e6 100644 --- a/src/devices/nm-device-bridge.c +++ b/src/devices/nm-device-bridge.c @@ -336,7 +336,7 @@ static const Option master_options[] = { FALSE, FALSE, FALSE }, { NM_SETTING_BRIDGE_VLAN_STATS_ENABLED, "vlan_stats_enabled", NULL, NULL, - 0, 1, 0, + FALSE, TRUE, NM_BRIDGE_VLAN_STATS_ENABLED_DEF, FALSE, FALSE, FALSE }, { NULL, NULL } }; |