diff options
author | Dan Williams <dcbw@redhat.com> | 2014-03-14 15:38:51 -0500 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2014-03-14 15:58:41 -0500 |
commit | 893735c814c5e282598c77cc7f513ecce532c0fd (patch) | |
tree | 388d3418affec93926513fd7884028d572c036b9 | |
parent | 13c348dcd910cc2db9590607a12a85fd174679f0 (diff) | |
download | NetworkManager-893735c814c5e282598c77cc7f513ecce532c0fd.tar.gz |
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().
-rw-r--r-- | src/platform/nm-linux-platform.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c index 5f80bc36c6..6311b3b9b9 100644 --- a/src/platform/nm-linux-platform.c +++ b/src/platform/nm-linux-platform.c @@ -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)); |