mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-24 21:50:17 +01:00
device: assert we're not waiting on a nil master
If we're notified of a master appearing, make sure there's actually an ifindex we're waiting for. Triger an assertion failure if that is not the case, cause that's pretty messed up.
This commit is contained in:
parent
bf60fd5acc
commit
455dbfce6e
1 changed files with 2 additions and 0 deletions
|
|
@ -6608,6 +6608,8 @@ device_ifindex_changed_cb(NMManager *manager, NMDevice *device_changed, NMDevice
|
|||
{
|
||||
NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE(self);
|
||||
|
||||
g_return_if_fail(priv->master_ifindex > 0);
|
||||
|
||||
if (priv->master_ifindex != nm_device_get_ifindex(device_changed))
|
||||
return;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue