summaryrefslogtreecommitdiffstats
path: root/lib/route
diff options
context:
space:
mode:
authorRoopa Prabhu <roopa@cumulusnetworks.com>2017-10-11 21:21:23 (GMT)
committerThomas Haller <thaller@redhat.com>2017-10-12 08:50:27 (GMT)
commit75ea0bee778d010f20e685bc4780b84d4139ab9e (patch)
treee9768c55bc7d6e8dd31f09c737a69b3a0fc25117 /lib/route
parentb4802a17a7655bfeee3e9c06e649d30b96dbad3b (diff)
downloadlibnl-75ea0bee778d010f20e685bc4780b84d4139ab9e.zip
libnl-75ea0bee778d010f20e685bc4780b84d4139ab9e.tar.gz
libnl-75ea0bee778d010f20e685bc4780b84d4139ab9e.tar.bz2
route: link: add family to dump messages
Since the link cache can contain msgs from different families, print family id to distinguish link cache entries in the dump output Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com> Signed-off-by: Thomas Haller <thaller@redhat.com>
Diffstat (limited to 'lib/route')
-rw-r--r--lib/route/link.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/route/link.c b/lib/route/link.c
index 4840c23..4384ea1 100644
--- a/lib/route/link.c
+++ b/lib/route/link.c
@@ -831,6 +831,9 @@ static void link_dump_line(struct nl_object *obj, struct nl_dump_params *p)
fetched_cache = 1;
}
+ if (link->l_family != AF_UNSPEC)
+ nl_dump_line(p, "%s ", nl_af2str(link->l_family, buf, sizeof(buf)));
+
nl_dump_line(p, "%s %s ", link->l_name,
nl_llproto2str(link->l_arptype, buf, sizeof(buf)));