mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-12 13:50:30 +01:00
initrd: disable STP on bridges
NM enables by default STP on bridges, which causes a forwarding delay
of 15 seconds on boot. Disable it.
(cherry picked from commit 0a006c0412)
This commit is contained in:
parent
df5785f22e
commit
e2830af77a
2 changed files with 10 additions and 3 deletions
|
|
@ -584,7 +584,6 @@ reader_parse_master (Reader *reader,
|
|||
{
|
||||
NMConnection *connection;
|
||||
NMSettingConnection *s_con;
|
||||
NMSettingBond *s_bond;
|
||||
gs_free char *master_to_free = NULL;
|
||||
const char *master;
|
||||
char *slaves;
|
||||
|
|
@ -603,8 +602,15 @@ reader_parse_master (Reader *reader,
|
|||
s_con = nm_connection_get_setting_connection (connection);
|
||||
master = nm_setting_connection_get_uuid (s_con);
|
||||
|
||||
if (nm_streq (type_name, NM_SETTING_BOND_SETTING_NAME)) {
|
||||
s_bond = (NMSettingBond *)nm_connection_get_setting_by_name (connection, type_name);
|
||||
if (nm_streq (type_name, NM_SETTING_BRIDGE_SETTING_NAME)) {
|
||||
NMSettingBridge *s_bridge = nm_connection_get_setting_bridge (connection);
|
||||
|
||||
/* Avoid the forwarding delay */
|
||||
g_object_set (s_bridge,
|
||||
NM_SETTING_BRIDGE_STP, FALSE,
|
||||
NULL);
|
||||
} else if (nm_streq (type_name, NM_SETTING_BOND_SETTING_NAME)) {
|
||||
NMSettingBond *s_bond = nm_connection_get_setting_bond (connection);
|
||||
|
||||
opts = get_word (&argument, ':');
|
||||
while (opts && *opts) {
|
||||
|
|
|
|||
|
|
@ -774,6 +774,7 @@ test_bridge (void)
|
|||
|
||||
s_bridge = nm_connection_get_setting_bridge (connection);
|
||||
g_assert (s_bridge);
|
||||
g_assert_cmpint (nm_setting_bridge_get_stp (s_bridge), ==, FALSE);
|
||||
|
||||
connection = g_hash_table_lookup (connections, "eth0");
|
||||
g_assert (connection);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue