mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-03-06 09:20:46 +01:00
nm-setting-bridge: add 'multicast-query-use-ifaddr' bridge option
https://bugzilla.redhat.com/show_bug.cgi?id=1755768
This commit is contained in:
parent
e01d3b4c2b
commit
a685cce70a
8 changed files with 166 additions and 98 deletions
|
|
@ -4899,6 +4899,9 @@ static const NMMetaPropertyInfo *const property_infos_BRIDGE[] = {
|
|||
.prompt = N_("Group forward mask [0]"),
|
||||
.property_type = &_pt_gobject_int,
|
||||
),
|
||||
PROPERTY_INFO_WITH_DESC (NM_SETTING_BRIDGE_MULTICAST_QUERY_USE_IFADDR,
|
||||
.property_type = &_pt_gobject_bool,
|
||||
),
|
||||
PROPERTY_INFO_WITH_DESC (NM_SETTING_BRIDGE_MULTICAST_SNOOPING,
|
||||
.is_cli_option = TRUE,
|
||||
.property_alias = "multicast-snooping",
|
||||
|
|
|
|||
|
|
@ -119,6 +119,7 @@
|
|||
#define DESCRIBE_DOC_NM_SETTING_BRIDGE_HELLO_TIME N_("The Spanning Tree Protocol (STP) hello time, in seconds.")
|
||||
#define DESCRIBE_DOC_NM_SETTING_BRIDGE_MAC_ADDRESS N_("If specified, the MAC address of bridge. When creating a new bridge, this MAC address will be set. If this field is left unspecified, the \"ethernet.cloned-mac-address\" is referred instead to generate the initial MAC address. Note that setting \"ethernet.cloned-mac-address\" anyway overwrites the MAC address of the bridge later while activating the bridge. Hence, this property is deprecated. Deprecated: 1")
|
||||
#define DESCRIBE_DOC_NM_SETTING_BRIDGE_MAX_AGE N_("The Spanning Tree Protocol (STP) maximum message age, in seconds.")
|
||||
#define DESCRIBE_DOC_NM_SETTING_BRIDGE_MULTICAST_QUERY_USE_IFADDR N_("If enabled the bridge's own IP address is used as the source address for IGMP queries otherwise the default of 0.0.0.0 is used.")
|
||||
#define DESCRIBE_DOC_NM_SETTING_BRIDGE_MULTICAST_ROUTER N_("Sets bridge's multicast router. multicast-snooping must be enabled for this option to work. Supported values are: 'auto', 'disabled', 'enabled'. If not specified the default value is 'auto'.")
|
||||
#define DESCRIBE_DOC_NM_SETTING_BRIDGE_MULTICAST_SNOOPING N_("Controls whether IGMP snooping is enabled for this bridge. Note that if snooping was automatically disabled due to hash collisions, the system may refuse to enable the feature until the collisions are resolved.")
|
||||
#define DESCRIBE_DOC_NM_SETTING_BRIDGE_PRIORITY N_("Sets the Spanning Tree Protocol (STP) priority for this bridge. Lower values are \"better\"; the lowest priority bridge will be elected the root bridge.")
|
||||
|
|
|
|||
|
|
@ -22,15 +22,16 @@
|
|||
* necessary for bridging connections.
|
||||
**/
|
||||
|
||||
#define BRIDGE_AGEING_TIME_DEFAULT 300
|
||||
#define BRIDGE_FORWARD_DELAY_DEFAULT 15
|
||||
#define BRIDGE_HELLO_TIME_DEFAULT 2
|
||||
#define BRIDGE_MAX_AGE_DEFAULT 20
|
||||
#define BRIDGE_MULTICAST_SNOOPING_DEFAULT TRUE
|
||||
#define BRIDGE_PRIORITY_DEFAULT 0x8000
|
||||
#define BRIDGE_STP_DEFAULT TRUE
|
||||
#define BRIDGE_VLAN_DEFAULT_PVID_DEFAULT 1
|
||||
#define BRIDGE_VLAN_STATS_ENABLED_DEFAULT FALSE
|
||||
#define BRIDGE_AGEING_TIME_DEFAULT 300
|
||||
#define BRIDGE_FORWARD_DELAY_DEFAULT 15
|
||||
#define BRIDGE_HELLO_TIME_DEFAULT 2
|
||||
#define BRIDGE_MAX_AGE_DEFAULT 20
|
||||
#define BRIDGE_MULTICAST_QUERY_USE_IFADDR_DEFAULT FALSE
|
||||
#define BRIDGE_MULTICAST_SNOOPING_DEFAULT TRUE
|
||||
#define BRIDGE_PRIORITY_DEFAULT 0x8000
|
||||
#define BRIDGE_STP_DEFAULT TRUE
|
||||
#define BRIDGE_VLAN_DEFAULT_PVID_DEFAULT 1
|
||||
#define BRIDGE_VLAN_STATS_ENABLED_DEFAULT FALSE
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
|
|
@ -45,6 +46,7 @@ NM_GOBJECT_PROPERTIES_DEFINE (NMSettingBridge,
|
|||
PROP_GROUP_ADDRESS,
|
||||
PROP_GROUP_FORWARD_MASK,
|
||||
PROP_MULTICAST_ROUTER,
|
||||
PROP_MULTICAST_QUERY_USE_IFADDR,
|
||||
PROP_MULTICAST_SNOOPING,
|
||||
PROP_VLAN_FILTERING,
|
||||
PROP_VLAN_DEFAULT_PVID,
|
||||
|
|
@ -70,6 +72,7 @@ typedef struct {
|
|||
bool vlan_filtering:1;
|
||||
bool stp:1;
|
||||
bool vlan_stats_enabled:1;
|
||||
bool multicast_query_use_ifaddr:1;
|
||||
} NMSettingBridgePrivate;
|
||||
|
||||
/**
|
||||
|
|
@ -971,6 +974,22 @@ nm_setting_bridge_get_multicast_router (const NMSettingBridge *setting)
|
|||
|
||||
return NM_SETTING_BRIDGE_GET_PRIVATE (setting)->multicast_router;
|
||||
}
|
||||
|
||||
/**
|
||||
* nm_setting_bridge_get_multicast_query_use_ifaddr:
|
||||
* @setting: the #NMSettingBridge
|
||||
*
|
||||
* Returns: the #NMSettingBridge:multicast-query-use-ifaddr property of the setting
|
||||
*
|
||||
* Since 1.24
|
||||
**/
|
||||
gboolean
|
||||
nm_setting_bridge_get_multicast_query_use_ifaddr (const NMSettingBridge *setting)
|
||||
{
|
||||
g_return_val_if_fail (NM_IS_SETTING_BRIDGE (setting), FALSE);
|
||||
|
||||
return NM_SETTING_BRIDGE_GET_PRIVATE (setting)->multicast_query_use_ifaddr;
|
||||
}
|
||||
/*****************************************************************************/
|
||||
|
||||
static gboolean
|
||||
|
|
@ -1202,6 +1221,9 @@ get_property (GObject *object, guint prop_id,
|
|||
case PROP_MULTICAST_ROUTER:
|
||||
g_value_set_string (value, priv->multicast_router);
|
||||
break;
|
||||
case PROP_MULTICAST_QUERY_USE_IFADDR:
|
||||
g_value_set_boolean (value, priv->multicast_query_use_ifaddr);
|
||||
break;
|
||||
case PROP_VLAN_FILTERING:
|
||||
g_value_set_boolean (value, priv->vlan_filtering);
|
||||
break;
|
||||
|
|
@ -1270,6 +1292,9 @@ set_property (GObject *object, guint prop_id,
|
|||
g_free (priv->multicast_router);
|
||||
priv->multicast_router = g_value_dup_string (value);
|
||||
break;
|
||||
case PROP_MULTICAST_QUERY_USE_IFADDR:
|
||||
priv->multicast_query_use_ifaddr = g_value_get_boolean (value);
|
||||
break;
|
||||
case PROP_VLAN_FILTERING:
|
||||
priv->vlan_filtering = g_value_get_boolean (value);
|
||||
break;
|
||||
|
|
@ -1304,15 +1329,16 @@ nm_setting_bridge_init (NMSettingBridge *setting)
|
|||
|
||||
priv->vlans = g_ptr_array_new_with_free_func ((GDestroyNotify) nm_bridge_vlan_unref);
|
||||
|
||||
priv->ageing_time = BRIDGE_AGEING_TIME_DEFAULT;
|
||||
priv->forward_delay = BRIDGE_FORWARD_DELAY_DEFAULT;
|
||||
priv->hello_time = BRIDGE_HELLO_TIME_DEFAULT;
|
||||
priv->max_age = BRIDGE_MAX_AGE_DEFAULT;
|
||||
priv->multicast_snooping = BRIDGE_MULTICAST_SNOOPING_DEFAULT;
|
||||
priv->priority = BRIDGE_PRIORITY_DEFAULT;
|
||||
priv->stp = BRIDGE_STP_DEFAULT;
|
||||
priv->vlan_default_pvid = BRIDGE_VLAN_DEFAULT_PVID_DEFAULT;
|
||||
priv->vlan_stats_enabled = BRIDGE_VLAN_STATS_ENABLED_DEFAULT;
|
||||
priv->ageing_time = BRIDGE_AGEING_TIME_DEFAULT;
|
||||
priv->forward_delay = BRIDGE_FORWARD_DELAY_DEFAULT;
|
||||
priv->hello_time = BRIDGE_HELLO_TIME_DEFAULT;
|
||||
priv->max_age = BRIDGE_MAX_AGE_DEFAULT;
|
||||
priv->multicast_snooping = BRIDGE_MULTICAST_SNOOPING_DEFAULT;
|
||||
priv->priority = BRIDGE_PRIORITY_DEFAULT;
|
||||
priv->stp = BRIDGE_STP_DEFAULT;
|
||||
priv->vlan_default_pvid = BRIDGE_VLAN_DEFAULT_PVID_DEFAULT;
|
||||
priv->vlan_stats_enabled = BRIDGE_VLAN_STATS_ENABLED_DEFAULT;
|
||||
priv->multicast_query_use_ifaddr = BRIDGE_MULTICAST_QUERY_USE_IFADDR_DEFAULT;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -1739,6 +1765,27 @@ nm_setting_bridge_class_init (NMSettingBridgeClass *klass)
|
|||
NM_SETTING_PARAM_INFERRABLE |
|
||||
G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingBridge:multicast-query-use-ifaddr:
|
||||
*
|
||||
* If enabled the bridge's own IP address is used as
|
||||
* the source address for IGMP queries otherwise
|
||||
* the default of 0.0.0.0 is used.
|
||||
**/
|
||||
/* ---ifcfg-rh---
|
||||
* property: multicast-query-use-ifaddr
|
||||
* variable: BRIDGING_OPTS: multicast_query_use_ifaddr=
|
||||
* default: 0
|
||||
* example: BRIDGING_OPTS="multicast_query-use_ifaddr=1"
|
||||
* ---end---
|
||||
*/
|
||||
obj_properties[PROP_MULTICAST_QUERY_USE_IFADDR] =
|
||||
g_param_spec_boolean (NM_SETTING_BRIDGE_MULTICAST_QUERY_USE_IFADDR, "", "",
|
||||
BRIDGE_MULTICAST_QUERY_USE_IFADDR_DEFAULT,
|
||||
G_PARAM_READWRITE |
|
||||
NM_SETTING_PARAM_INFERRABLE |
|
||||
G_PARAM_STATIC_STRINGS);
|
||||
|
||||
g_object_class_install_properties (object_class, _PROPERTY_ENUMS_LAST, obj_properties);
|
||||
|
||||
_nm_setting_class_commit_full (setting_class, NM_META_SETTING_TYPE_BRIDGE,
|
||||
|
|
|
|||
|
|
@ -23,22 +23,23 @@ G_BEGIN_DECLS
|
|||
|
||||
#define NM_SETTING_BRIDGE_SETTING_NAME "bridge"
|
||||
|
||||
#define NM_SETTING_BRIDGE_MAC_ADDRESS "mac-address"
|
||||
#define NM_SETTING_BRIDGE_STP "stp"
|
||||
#define NM_SETTING_BRIDGE_PRIORITY "priority"
|
||||
#define NM_SETTING_BRIDGE_FORWARD_DELAY "forward-delay"
|
||||
#define NM_SETTING_BRIDGE_HELLO_TIME "hello-time"
|
||||
#define NM_SETTING_BRIDGE_MAX_AGE "max-age"
|
||||
#define NM_SETTING_BRIDGE_AGEING_TIME "ageing-time"
|
||||
#define NM_SETTING_BRIDGE_GROUP_FORWARD_MASK "group-forward-mask"
|
||||
#define NM_SETTING_BRIDGE_MULTICAST_SNOOPING "multicast-snooping"
|
||||
#define NM_SETTING_BRIDGE_MULTICAST_ROUTER "multicast-router"
|
||||
#define NM_SETTING_BRIDGE_VLAN_FILTERING "vlan-filtering"
|
||||
#define NM_SETTING_BRIDGE_VLAN_DEFAULT_PVID "vlan-default-pvid"
|
||||
#define NM_SETTING_BRIDGE_VLANS "vlans"
|
||||
#define NM_SETTING_BRIDGE_GROUP_ADDRESS "group-address"
|
||||
#define NM_SETTING_BRIDGE_VLAN_PROTOCOL "vlan-protocol"
|
||||
#define NM_SETTING_BRIDGE_VLAN_STATS_ENABLED "vlan-stats-enabled"
|
||||
#define NM_SETTING_BRIDGE_MAC_ADDRESS "mac-address"
|
||||
#define NM_SETTING_BRIDGE_STP "stp"
|
||||
#define NM_SETTING_BRIDGE_PRIORITY "priority"
|
||||
#define NM_SETTING_BRIDGE_FORWARD_DELAY "forward-delay"
|
||||
#define NM_SETTING_BRIDGE_HELLO_TIME "hello-time"
|
||||
#define NM_SETTING_BRIDGE_MAX_AGE "max-age"
|
||||
#define NM_SETTING_BRIDGE_AGEING_TIME "ageing-time"
|
||||
#define NM_SETTING_BRIDGE_GROUP_FORWARD_MASK "group-forward-mask"
|
||||
#define NM_SETTING_BRIDGE_MULTICAST_SNOOPING "multicast-snooping"
|
||||
#define NM_SETTING_BRIDGE_MULTICAST_ROUTER "multicast-router"
|
||||
#define NM_SETTING_BRIDGE_MULTICAST_QUERY_USE_IFADDR "multicast-query-use-ifaddr"
|
||||
#define NM_SETTING_BRIDGE_VLAN_FILTERING "vlan-filtering"
|
||||
#define NM_SETTING_BRIDGE_VLAN_DEFAULT_PVID "vlan-default-pvid"
|
||||
#define NM_SETTING_BRIDGE_VLANS "vlans"
|
||||
#define NM_SETTING_BRIDGE_GROUP_ADDRESS "group-address"
|
||||
#define NM_SETTING_BRIDGE_VLAN_PROTOCOL "vlan-protocol"
|
||||
#define NM_SETTING_BRIDGE_VLAN_STATS_ENABLED "vlan-stats-enabled"
|
||||
|
||||
#define NM_BRIDGE_VLAN_VID_MIN 1
|
||||
#define NM_BRIDGE_VLAN_VID_MAX 4094
|
||||
|
|
@ -132,6 +133,9 @@ gboolean nm_setting_bridge_get_vlan_stats_enabled (const NMSettingBridge *settin
|
|||
NM_AVAILABLE_IN_1_24
|
||||
const char * nm_setting_bridge_get_multicast_router (const NMSettingBridge *setting);
|
||||
|
||||
NM_AVAILABLE_IN_1_24
|
||||
gboolean nm_setting_bridge_get_multicast_query_use_ifaddr (const NMSettingBridge *setting);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __NM_SETTING_BRIDGE_H__ */
|
||||
|
|
|
|||
|
|
@ -1686,6 +1686,7 @@ global:
|
|||
nm_setting_802_1x_get_phase2_domain_match;
|
||||
nm_setting_bond_get_option_normalized;
|
||||
nm_setting_bridge_get_group_address;
|
||||
nm_setting_bridge_get_multicast_query_use_ifaddr;
|
||||
nm_setting_bridge_get_multicast_router;
|
||||
nm_setting_bridge_get_vlan_protocol;
|
||||
nm_setting_bridge_get_vlan_stats_enabled;
|
||||
|
|
|
|||
|
|
@ -246,54 +246,58 @@ typedef struct {
|
|||
} Option;
|
||||
|
||||
static const Option master_options[] = {
|
||||
{ NM_SETTING_BRIDGE_STP, "stp_state", /* this must stay as the first item */
|
||||
NULL, NULL,
|
||||
0, 1, 1,
|
||||
FALSE, FALSE, FALSE },
|
||||
{ NM_SETTING_BRIDGE_PRIORITY, "priority",
|
||||
NULL, NULL,
|
||||
0, G_MAXUINT16, 0x8000,
|
||||
TRUE, FALSE, TRUE },
|
||||
{ NM_SETTING_BRIDGE_FORWARD_DELAY, "forward_delay",
|
||||
NULL, NULL,
|
||||
0, NM_BR_MAX_FORWARD_DELAY, 15,
|
||||
TRUE, TRUE, TRUE},
|
||||
{ NM_SETTING_BRIDGE_HELLO_TIME, "hello_time",
|
||||
NULL, NULL,
|
||||
0, NM_BR_MAX_HELLO_TIME, 2,
|
||||
TRUE, TRUE, TRUE },
|
||||
{ NM_SETTING_BRIDGE_MAX_AGE, "max_age",
|
||||
NULL, NULL,
|
||||
0, NM_BR_MAX_MAX_AGE, 20,
|
||||
TRUE, TRUE, TRUE },
|
||||
{ NM_SETTING_BRIDGE_AGEING_TIME, "ageing_time",
|
||||
NULL, NULL,
|
||||
NM_BR_MIN_AGEING_TIME, NM_BR_MAX_AGEING_TIME, 300,
|
||||
TRUE, TRUE, FALSE },
|
||||
{ NM_SETTING_BRIDGE_GROUP_FORWARD_MASK, "group_fwd_mask",
|
||||
NULL, NULL,
|
||||
0, 0xFFFF, 0,
|
||||
TRUE, FALSE, FALSE },
|
||||
{ NM_SETTING_BRIDGE_MULTICAST_SNOOPING, "multicast_snooping",
|
||||
NULL, NULL,
|
||||
0, 1, 1,
|
||||
FALSE, FALSE, FALSE },
|
||||
{ NM_SETTING_BRIDGE_MULTICAST_ROUTER, "multicast_router",
|
||||
to_sysfs_multicast_router, from_sysfs_multicast_router,
|
||||
0, 0, 0,
|
||||
FALSE, FALSE, FALSE },
|
||||
{ NM_SETTING_BRIDGE_GROUP_ADDRESS, "group_addr",
|
||||
to_sysfs_group_address, from_sysfs_group_address,
|
||||
0, 0, 0,
|
||||
FALSE, FALSE, FALSE },
|
||||
{ NM_SETTING_BRIDGE_VLAN_PROTOCOL, "vlan_protocol",
|
||||
to_sysfs_vlan_protocol, from_sysfs_vlan_protocol,
|
||||
0, 0, 0,
|
||||
FALSE, FALSE, FALSE },
|
||||
{ NM_SETTING_BRIDGE_VLAN_STATS_ENABLED, "vlan_stats_enabled",
|
||||
NULL, NULL,
|
||||
0, 1, 0,
|
||||
FALSE, FALSE, FALSE },
|
||||
{ NM_SETTING_BRIDGE_STP, "stp_state", /* this must stay as the first item */
|
||||
NULL, NULL,
|
||||
0, 1, 1,
|
||||
FALSE, FALSE, FALSE },
|
||||
{ NM_SETTING_BRIDGE_PRIORITY, "priority",
|
||||
NULL, NULL,
|
||||
0, G_MAXUINT16, 0x8000,
|
||||
TRUE, FALSE, TRUE },
|
||||
{ NM_SETTING_BRIDGE_FORWARD_DELAY, "forward_delay",
|
||||
NULL, NULL,
|
||||
0, NM_BR_MAX_FORWARD_DELAY, 15,
|
||||
TRUE, TRUE, TRUE},
|
||||
{ NM_SETTING_BRIDGE_HELLO_TIME, "hello_time",
|
||||
NULL, NULL,
|
||||
0, NM_BR_MAX_HELLO_TIME, 2,
|
||||
TRUE, TRUE, TRUE },
|
||||
{ NM_SETTING_BRIDGE_MAX_AGE, "max_age",
|
||||
NULL, NULL,
|
||||
0, NM_BR_MAX_MAX_AGE, 20,
|
||||
TRUE, TRUE, TRUE },
|
||||
{ NM_SETTING_BRIDGE_AGEING_TIME, "ageing_time",
|
||||
NULL, NULL,
|
||||
NM_BR_MIN_AGEING_TIME, NM_BR_MAX_AGEING_TIME, 300,
|
||||
TRUE, TRUE, FALSE },
|
||||
{ NM_SETTING_BRIDGE_GROUP_FORWARD_MASK, "group_fwd_mask",
|
||||
NULL, NULL,
|
||||
0, 0xFFFF, 0,
|
||||
TRUE, FALSE, FALSE },
|
||||
{ NM_SETTING_BRIDGE_MULTICAST_QUERY_USE_IFADDR, "multicast_query_use_ifaddr",
|
||||
NULL, NULL,
|
||||
0, 1, 0,
|
||||
FALSE, FALSE, FALSE },
|
||||
{ NM_SETTING_BRIDGE_MULTICAST_SNOOPING, "multicast_snooping",
|
||||
NULL, NULL,
|
||||
0, 1, 1,
|
||||
FALSE, FALSE, FALSE },
|
||||
{ NM_SETTING_BRIDGE_MULTICAST_ROUTER, "multicast_router",
|
||||
to_sysfs_multicast_router, from_sysfs_multicast_router,
|
||||
0, 0, 0,
|
||||
FALSE, FALSE, FALSE },
|
||||
{ NM_SETTING_BRIDGE_GROUP_ADDRESS, "group_addr",
|
||||
to_sysfs_group_address, from_sysfs_group_address,
|
||||
0, 0, 0,
|
||||
FALSE, FALSE, FALSE },
|
||||
{ NM_SETTING_BRIDGE_VLAN_PROTOCOL, "vlan_protocol",
|
||||
to_sysfs_vlan_protocol, from_sysfs_vlan_protocol,
|
||||
0, 0, 0,
|
||||
FALSE, FALSE, FALSE },
|
||||
{ NM_SETTING_BRIDGE_VLAN_STATS_ENABLED, "vlan_stats_enabled",
|
||||
NULL, NULL,
|
||||
0, 1, 0,
|
||||
FALSE, FALSE, FALSE },
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -5152,22 +5152,23 @@ handle_bridge_option (NMSetting *setting,
|
|||
gboolean only_with_stp;
|
||||
gboolean extended_bool;
|
||||
} m/*etadata*/[] = {
|
||||
{ "DELAY", NM_SETTING_BRIDGE_FORWARD_DELAY, BRIDGE_OPT_TYPE_MAIN, .only_with_stp = TRUE },
|
||||
{ "priority", NM_SETTING_BRIDGE_PRIORITY, BRIDGE_OPT_TYPE_OPTION, .only_with_stp = TRUE },
|
||||
{ "hello_time", NM_SETTING_BRIDGE_HELLO_TIME, BRIDGE_OPT_TYPE_OPTION, .only_with_stp = TRUE },
|
||||
{ "max_age", NM_SETTING_BRIDGE_MAX_AGE, BRIDGE_OPT_TYPE_OPTION, .only_with_stp = TRUE },
|
||||
{ "ageing_time", NM_SETTING_BRIDGE_AGEING_TIME, BRIDGE_OPT_TYPE_OPTION },
|
||||
{ "multicast_snooping", NM_SETTING_BRIDGE_MULTICAST_SNOOPING, BRIDGE_OPT_TYPE_OPTION },
|
||||
{ "multicast_router", NM_SETTING_BRIDGE_MULTICAST_ROUTER, BRIDGE_OPT_TYPE_OPTION },
|
||||
{ "vlan_filtering", NM_SETTING_BRIDGE_VLAN_FILTERING, BRIDGE_OPT_TYPE_OPTION },
|
||||
{ "default_pvid", NM_SETTING_BRIDGE_VLAN_DEFAULT_PVID, BRIDGE_OPT_TYPE_OPTION },
|
||||
{ "group_address", NM_SETTING_BRIDGE_GROUP_ADDRESS, BRIDGE_OPT_TYPE_OPTION },
|
||||
{ "group_fwd_mask", NM_SETTING_BRIDGE_GROUP_FORWARD_MASK, BRIDGE_OPT_TYPE_OPTION },
|
||||
{ "vlan_protocol", NM_SETTING_BRIDGE_VLAN_PROTOCOL, BRIDGE_OPT_TYPE_OPTION },
|
||||
{ "vlan_stats_enabled", NM_SETTING_BRIDGE_VLAN_STATS_ENABLED, BRIDGE_OPT_TYPE_OPTION },
|
||||
{ "priority", NM_SETTING_BRIDGE_PORT_PRIORITY, BRIDGE_OPT_TYPE_PORT_OPTION },
|
||||
{ "path_cost", NM_SETTING_BRIDGE_PORT_PATH_COST, BRIDGE_OPT_TYPE_PORT_OPTION },
|
||||
{ "hairpin_mode", NM_SETTING_BRIDGE_PORT_HAIRPIN_MODE, BRIDGE_OPT_TYPE_PORT_OPTION, .extended_bool = TRUE, },
|
||||
{ "DELAY", NM_SETTING_BRIDGE_FORWARD_DELAY, BRIDGE_OPT_TYPE_MAIN, .only_with_stp = TRUE },
|
||||
{ "priority", NM_SETTING_BRIDGE_PRIORITY, BRIDGE_OPT_TYPE_OPTION, .only_with_stp = TRUE },
|
||||
{ "hello_time", NM_SETTING_BRIDGE_HELLO_TIME, BRIDGE_OPT_TYPE_OPTION, .only_with_stp = TRUE },
|
||||
{ "max_age", NM_SETTING_BRIDGE_MAX_AGE, BRIDGE_OPT_TYPE_OPTION, .only_with_stp = TRUE },
|
||||
{ "ageing_time", NM_SETTING_BRIDGE_AGEING_TIME, BRIDGE_OPT_TYPE_OPTION },
|
||||
{ "multicast_query_use_ifaddr", NM_SETTING_BRIDGE_MULTICAST_QUERY_USE_IFADDR, BRIDGE_OPT_TYPE_OPTION },
|
||||
{ "multicast_snooping", NM_SETTING_BRIDGE_MULTICAST_SNOOPING, BRIDGE_OPT_TYPE_OPTION },
|
||||
{ "multicast_router", NM_SETTING_BRIDGE_MULTICAST_ROUTER, BRIDGE_OPT_TYPE_OPTION },
|
||||
{ "vlan_filtering", NM_SETTING_BRIDGE_VLAN_FILTERING, BRIDGE_OPT_TYPE_OPTION },
|
||||
{ "default_pvid", NM_SETTING_BRIDGE_VLAN_DEFAULT_PVID, BRIDGE_OPT_TYPE_OPTION },
|
||||
{ "group_address", NM_SETTING_BRIDGE_GROUP_ADDRESS, BRIDGE_OPT_TYPE_OPTION },
|
||||
{ "group_fwd_mask", NM_SETTING_BRIDGE_GROUP_FORWARD_MASK, BRIDGE_OPT_TYPE_OPTION },
|
||||
{ "vlan_protocol", NM_SETTING_BRIDGE_VLAN_PROTOCOL, BRIDGE_OPT_TYPE_OPTION },
|
||||
{ "vlan_stats_enabled", NM_SETTING_BRIDGE_VLAN_STATS_ENABLED, BRIDGE_OPT_TYPE_OPTION },
|
||||
{ "priority", NM_SETTING_BRIDGE_PORT_PRIORITY, BRIDGE_OPT_TYPE_PORT_OPTION },
|
||||
{ "path_cost", NM_SETTING_BRIDGE_PORT_PATH_COST, BRIDGE_OPT_TYPE_PORT_OPTION },
|
||||
{ "hairpin_mode", NM_SETTING_BRIDGE_PORT_HAIRPIN_MODE, BRIDGE_OPT_TYPE_PORT_OPTION, .extended_bool = TRUE, },
|
||||
};
|
||||
const char *error_message = NULL;
|
||||
int i;
|
||||
|
|
|
|||
|
|
@ -1501,6 +1501,13 @@ write_bridge_setting (NMConnection *connection, shvarFile *ifcfg, gboolean *wire
|
|||
g_string_append_printf (opts, "group_fwd_mask=%u", i);
|
||||
}
|
||||
|
||||
b = nm_setting_bridge_get_multicast_query_use_ifaddr (s_bridge);
|
||||
if (b != get_setting_default_boolean (NM_SETTING (s_bridge), NM_SETTING_BRIDGE_MULTICAST_QUERY_USE_IFADDR)) {
|
||||
if (opts->len)
|
||||
g_string_append_c (opts, ' ');
|
||||
g_string_append_printf (opts, "multicast_query_use_ifaddr=%u", (guint) b);
|
||||
}
|
||||
|
||||
b = nm_setting_bridge_get_multicast_snooping (s_bridge);
|
||||
if (b != get_setting_default_boolean (NM_SETTING (s_bridge), NM_SETTING_BRIDGE_MULTICAST_SNOOPING)) {
|
||||
if (opts->len)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue