diff options
author | Thomas Haller <thaller@redhat.com> | 2020-05-05 12:34:26 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2020-05-08 08:02:50 +0200 |
commit | ec9e58ee0143c6d835df107d9578ab254ae1aa72 (patch) | |
tree | d270658cefa3e1941c6c7846f83663cb3c4701e1 | |
parent | 769b176263123faded0ac9e2aef770299806f2fa (diff) | |
download | NetworkManager-ec9e58ee0143c6d835df107d9578ab254ae1aa72.tar.gz |
libnm: adjust bridge defines NM_BRIDGE_MULTICAST_LAST_MEMBER_INTERVAL_*
-rw-r--r-- | libnm-core/nm-core-internal.h | 5 | ||||
-rw-r--r-- | libnm-core/nm-setting-bridge.c | 4 | ||||
-rw-r--r-- | src/devices/nm-device-bridge.c | 2 |
3 files changed, 7 insertions, 4 deletions
diff --git a/libnm-core/nm-core-internal.h b/libnm-core/nm-core-internal.h index 0d4b925dc3..5f8f427cad 100644 --- a/libnm-core/nm-core-internal.h +++ b/libnm-core/nm-core-internal.h @@ -117,7 +117,10 @@ #define NM_BRIDGE_MULTICAST_LAST_MEMBER_COUNT_DEF 2u #define NM_BRIDGE_MULTICAST_LAST_MEMBER_COUNT_MAX ((guint) G_MAXUINT32) -#define BRIDGE_MULTICAST_LAST_MEMBER_INTERVAL_DEFAULT 100 +#define NM_BRIDGE_MULTICAST_LAST_MEMBER_INTERVAL_MIN ((guint64) 0) +#define NM_BRIDGE_MULTICAST_LAST_MEMBER_INTERVAL_DEF ((guint64) 100) +#define NM_BRIDGE_MULTICAST_LAST_MEMBER_INTERVAL_MAX G_MAXUINT64 + #define BRIDGE_MULTICAST_MEMBERSHIP_INTERVAL_DEFAULT 26000 #define BRIDGE_MULTICAST_QUERIER_INTERVAL_DEFAULT 25500 #define BRIDGE_MULTICAST_QUERIER_DEFAULT FALSE diff --git a/libnm-core/nm-setting-bridge.c b/libnm-core/nm-setting-bridge.c index 1d2e58a8eb..b6b36cdfde 100644 --- a/libnm-core/nm-setting-bridge.c +++ b/libnm-core/nm-setting-bridge.c @@ -1574,7 +1574,7 @@ nm_setting_bridge_init (NMSettingBridge *setting) priv->hello_time = NM_BRIDGE_HELLO_TIME_DEF; priv->max_age = NM_BRIDGE_MAX_AGE_DEF; priv->multicast_last_member_count = NM_BRIDGE_MULTICAST_LAST_MEMBER_COUNT_DEF; - priv->multicast_last_member_interval = BRIDGE_MULTICAST_LAST_MEMBER_INTERVAL_DEFAULT; + priv->multicast_last_member_interval = NM_BRIDGE_MULTICAST_LAST_MEMBER_INTERVAL_DEF; priv->multicast_membership_interval = BRIDGE_MULTICAST_MEMBERSHIP_INTERVAL_DEFAULT; priv->multicast_hash_max = NM_BRIDGE_MULTICAST_HASH_MAX_DEF; priv->multicast_snooping = BRIDGE_MULTICAST_SNOOPING_DEFAULT; @@ -2127,7 +2127,7 @@ nm_setting_bridge_class_init (NMSettingBridgeClass *klass) */ obj_properties[PROP_MULTICAST_LAST_MEMBER_INTERVAL] = g_param_spec_uint64 (NM_SETTING_BRIDGE_MULTICAST_LAST_MEMBER_INTERVAL, "", "", - 0, G_MAXUINT64, BRIDGE_MULTICAST_LAST_MEMBER_INTERVAL_DEFAULT, + NM_BRIDGE_MULTICAST_LAST_MEMBER_INTERVAL_MIN, NM_BRIDGE_MULTICAST_LAST_MEMBER_INTERVAL_MAX, NM_BRIDGE_MULTICAST_LAST_MEMBER_INTERVAL_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 1926197ed7..15c0ce702f 100644 --- a/src/devices/nm-device-bridge.c +++ b/src/devices/nm-device-bridge.c @@ -284,7 +284,7 @@ static const Option master_options[] = { FALSE, FALSE, FALSE }, { NM_SETTING_BRIDGE_MULTICAST_LAST_MEMBER_INTERVAL, "multicast_last_member_interval", NULL, NULL, - 0, G_MAXUINT64, 100, + NM_BRIDGE_MULTICAST_LAST_MEMBER_INTERVAL_MIN, NM_BRIDGE_MULTICAST_LAST_MEMBER_INTERVAL_MAX, NM_BRIDGE_MULTICAST_LAST_MEMBER_INTERVAL_DEF, FALSE, FALSE, FALSE }, { NM_SETTING_BRIDGE_MULTICAST_MEMBERSHIP_INTERVAL, "multicast_membership_interval", NULL, NULL, |