summaryrefslogtreecommitdiffstats
path: root/lib/route/link/ip6tnl.c
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2015-10-16 09:21:25 (GMT)
committerThomas Haller <thaller@redhat.com>2015-11-19 16:40:17 (GMT)
commit3fedee55b8965a7496762fcef2f73455644f67f5 (patch)
treea94e6f527cdc3a76ebab043b2ef9e61d236e377e /lib/route/link/ip6tnl.c
parent3f231213c7c586b5a5e8ce6b1ea9c1d3b24d74c0 (diff)
downloadlibnl-3fedee55b8965a7496762fcef2f73455644f67f5.zip
libnl-3fedee55b8965a7496762fcef2f73455644f67f5.tar.gz
libnl-3fedee55b8965a7496762fcef2f73455644f67f5.tar.bz2
route/link: fix dump of parent link for some link types
Some link types incorrectly dump their own interface name as parent link; fix this. Signed-off-by: Beniamino Galvani <bgalvani@redhat.com> Signed-off-by: Thomas Haller <thaller@redhat.com>
Diffstat (limited to 'lib/route/link/ip6tnl.c')
-rw-r--r--lib/route/link/ip6tnl.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/route/link/ip6tnl.c b/lib/route/link/ip6tnl.c
index 59b06b7..085bf66 100644
--- a/lib/route/link/ip6tnl.c
+++ b/lib/route/link/ip6tnl.c
@@ -218,10 +218,16 @@ static void ip6_tnl_dump_details(struct rtnl_link *link, struct nl_dump_params *
{
struct ip6_tnl_info *ip6_tnl = link->l_info;
char *name, addr[INET6_ADDRSTRLEN];
+ struct rtnl_link *parent;
if (ip6_tnl->ip6_tnl_mask & IP6_TNL_ATTR_LINK) {
nl_dump(p, " link ");
- name = rtnl_link_get_name(link);
+
+ name = NULL;
+ parent = link_lookup(link->ce_cache, ip6_tnl->link);
+ if (parent)
+ name = rtnl_link_get_name(parent);
+
if (name)
nl_dump_line(p, "%s\n", name);
else