bridge: allow ageing_time option to be zero

If the user wants to disable MAC ageing on the bridge, they need to set
ageing_time to zero.

https://bugzilla.redhat.com/show_bug.cgi?id=1871950
This commit is contained in:
Fernando Fernandez Mancera 2021-11-23 14:27:22 +01:00
parent 5e0764cf8e
commit 4549995052

View file

@ -339,7 +339,6 @@ static const Option master_options[] = {
OPTION_TYPE_INT(NM_BRIDGE_AGEING_TIME_MIN,
NM_BRIDGE_AGEING_TIME_MAX,
NM_BRIDGE_AGEING_TIME_DEF),
.default_if_zero = TRUE,
.user_hz_compensate = TRUE, ),
OPTION(NM_SETTING_BRIDGE_GROUP_FORWARD_MASK, "group_fwd_mask", OPTION_TYPE_INT(0, 0xFFFF, 0), ),
OPTION(NM_SETTING_BRIDGE_MULTICAST_HASH_MAX,
@ -1062,8 +1061,7 @@ create_and_realize(NMDevice * device,
NM_BRIDGE_HELLO_TIME_DEF_SYS),
.max_age = _DEFAULT_IF_ZERO(nm_setting_bridge_get_max_age(s_bridge) * 100u,
NM_BRIDGE_MAX_AGE_DEF_SYS),
.ageing_time = _DEFAULT_IF_ZERO(nm_setting_bridge_get_ageing_time(s_bridge) * 100u,
NM_BRIDGE_AGEING_TIME_DEF_SYS),
.ageing_time = nm_setting_bridge_get_ageing_time(s_bridge) * 100u,
.stp_state = nm_setting_bridge_get_stp(s_bridge),
.priority = nm_setting_bridge_get_priority(s_bridge),
.vlan_protocol = to_sysfs_vlan_protocol_sys(nm_setting_bridge_get_vlan_protocol(s_bridge)),