mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-11 00:10:33 +01:00
bond: check for NULL bond mode value in update_connection()
Don't crash if the bond mode can't be read from sysfs - for example
when the interface disappears. The generated connection will be bogus,
but at that point it doesn't matter because the in-memory connection
will be destroyed.
Fixes: 056a973a4f
https://bugzilla.redhat.com/show_bug.cgi?id=1459580
This commit is contained in:
parent
f07dca941d
commit
5600a27c2a
1 changed files with 1 additions and 1 deletions
|
|
@ -177,7 +177,7 @@ update_connection (NMDevice *device, NMConnection *connection)
|
|||
*p = '\0';
|
||||
}
|
||||
|
||||
if (nm_streq (*options, NM_SETTING_BOND_OPTION_MODE))
|
||||
if (value && nm_streq (*options, NM_SETTING_BOND_OPTION_MODE))
|
||||
mode = _nm_setting_bond_mode_from_string (value);
|
||||
|
||||
if (!_nm_setting_bond_option_supported (*options, mode))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue