Commit 893735c8 authored by Dan Williams's avatar Dan Williams
Browse files

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().
parent 13c348dc
......@@ -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));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment