mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-26 11:10:09 +01:00
infiniband: don't crash if the parent interface is not yet there
Just bail politely just like vlans do.
(cherry picked from commit 1a5fec681b)
This commit is contained in:
parent
ce0893e532
commit
fd06f0498f
1 changed files with 3 additions and 0 deletions
|
|
@ -387,6 +387,9 @@ get_virtual_iface_name (NMDeviceFactory *factory,
|
|||
s_infiniband = nm_connection_get_setting_infiniband (connection);
|
||||
g_assert (s_infiniband);
|
||||
|
||||
if (!parent_iface)
|
||||
return NULL;
|
||||
|
||||
g_return_val_if_fail (g_strcmp0 (parent_iface, nm_setting_infiniband_get_parent (s_infiniband)) == 0, NULL);
|
||||
|
||||
return g_strdup (nm_setting_infiniband_get_virtual_interface_name (s_infiniband));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue