+/* SPDX-License-Identifier: GPL-2.0 */
/*
* Get/set/delete fdb table with netlink
*
unsigned int ifindex = rta_getattr_u32(tb[NDA_IFINDEX]);
if (ifindex) {
- char ifname[IF_NAMESIZE];
+ if (!tb[NDA_LINK_NETNSID]) {
+ const char *ifname = ll_index_to_name(ifindex);
- if (!tb[NDA_LINK_NETNSID] &&
- if_indextoname(ifindex, ifname)) {
if (jw_global)
jsonw_string_field(jw_global, "viaIf",
ifname);