mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-09 13:10:39 +01:00
platform: fix crash if link has no name after 5e935dfd
When a VPN goes down, like at suspend, and the link has already
disappeared, the new platform logging code tries to print the
link information using a link object with only the ifindex filled
in. When adding/removing/changing links, internal code often fills
in just the ifindex (becuase that's all you need). Thus
to_string_link() will always fail if that operation fails.
at platform/nm-linux-platform.c:688
at platform/nm-linux-platform.c:1835
at vpn-manager/nm-vpn-connection.c:274
Work around that for now and live with the warnings until
we decide what to actually do about to_string_link().
This commit is contained in:
parent
13c348dcd9
commit
893735c814
1 changed files with 1 additions and 0 deletions
|
|
@ -790,6 +790,7 @@ init_link (NMPlatform *platform, NMPlatformLink *info, struct rtnl_link *rtnllin
|
|||
GUdevDevice *udev_device;
|
||||
|
||||
g_return_val_if_fail (rtnllink, FALSE);
|
||||
g_return_val_if_fail (rtnl_link_get_name (rtnllink), FALSE);
|
||||
|
||||
memset (info, 0, sizeof (*info));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue