mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-03-06 17:30:36 +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:056a973a4fhttps://bugzilla.redhat.com/show_bug.cgi?id=1459580 (cherry picked from commit5600a27c2a)
This commit is contained in:
parent
58e4257e22
commit
a3a792dd22
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