summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorTobias Jungel <tobias.jungel@bisdn.de>2018-04-20 13:11:46 (GMT)
committerThomas Haller <thaller@redhat.com>2018-06-25 12:30:02 (GMT)
commit3ebb0ea66b165d061c287164ca4514c13f8b2772 (patch)
tree9e11122d7c6f8b39427a24afb740e55ff76bfcbc /lib
parent2e87f72bf4f5ebc2ca66443598f0ec0351765ddb (diff)
downloadlibnl-3ebb0ea66b165d061c287164ca4514c13f8b2772.zip
libnl-3ebb0ea66b165d061c287164ca4514c13f8b2772.tar.gz
libnl-3ebb0ea66b165d061c287164ca4514c13f8b2772.tar.bz2
neigh_dump_line: dump master as well
In case NEIGH_ATTR_MASTER is set this dumps as well the master interface. https://github.com/thom311/libnl/pull/190
Diffstat (limited to 'lib')
-rw-r--r--lib/route/neigh.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/route/neigh.c b/lib/route/neigh.c
index faad1d4..7ea3ea2 100644
--- a/lib/route/neigh.c
+++ b/lib/route/neigh.c
@@ -514,6 +514,14 @@ static void neigh_dump_line(struct nl_object *a, struct nl_dump_params *p)
if (n->ce_mask & NEIGH_ATTR_VLAN)
nl_dump(p, "vlan %d ", n->n_vlan);
+ if (n->ce_mask & NEIGH_ATTR_MASTER) {
+ if (link_cache)
+ nl_dump(p, "%s ", rtnl_link_i2name(link_cache, n->n_master,
+ state, sizeof(state)));
+ else
+ nl_dump(p, "%d ", n->n_master);
+ }
+
rtnl_neigh_state2str(n->n_state, state, sizeof(state));
rtnl_neigh_flags2str(n->n_flags, flags, sizeof(flags));