diff options
Diffstat (limited to 'zebra/interface.c')
| -rw-r--r-- | zebra/interface.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/zebra/interface.c b/zebra/interface.c index 8b25c33f17..7b19379910 100644 --- a/zebra/interface.c +++ b/zebra/interface.c @@ -183,6 +183,14 @@ if_lookup_by_index_per_ns (struct zebra_ns *ns, u_int32_t ifindex) return ifp; } +const char * +ifindex2ifname_per_ns (struct zebra_ns *zns, unsigned int ifindex) +{ + struct interface *ifp; + + return ((ifp = if_lookup_by_index_per_ns (zns, ifindex)) != NULL) ? + ifp->name : "unknown"; +} /* Tie an interface address to its derived subnet list of addresses. */ int |
