diff options
Diffstat (limited to 'zebra/if_netlink.c')
| -rw-r--r-- | zebra/if_netlink.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/zebra/if_netlink.c b/zebra/if_netlink.c index 35cb3a6f5f..4e9b093610 100644 --- a/zebra/if_netlink.c +++ b/zebra/if_netlink.c @@ -606,7 +606,6 @@ static int netlink_interface(struct nlmsghdr *h, ns_id_t ns_id, int startup) ifindex_t link_ifindex = IFINDEX_INTERNAL; ifindex_t bond_ifindex = IFINDEX_INTERNAL; struct zebra_if *zif; - struct vrf *vrf = NULL; zns = zebra_ns_lookup(ns_id); ifi = NLMSG_DATA(h); @@ -690,7 +689,6 @@ static int netlink_interface(struct nlmsghdr *h, ns_id_t ns_id, int startup) if (tb[IFLA_LINK]) link_ifindex = *(ifindex_t *)RTA_DATA(tb[IFLA_LINK]); - vrf = vrf_get(vrf_id, NULL); /* Add interface. * We add by index first because in some cases such as the master * interface, we have the index before we have the name. Fixing @@ -699,8 +697,9 @@ static int netlink_interface(struct nlmsghdr *h, ns_id_t ns_id, int startup) */ ifp = if_get_by_ifindex(ifi->ifi_index, vrf_id); set_ifindex(ifp, ifi->ifi_index, zns); /* add it to ns struct */ - strlcpy(ifp->name, name, sizeof(ifp->name)); - IFNAME_RB_INSERT(vrf, ifp); + + if_set_name(ifp, name); + ifp->flags = ifi->ifi_flags & 0x0000fffff; ifp->mtu6 = ifp->mtu = *(uint32_t *)RTA_DATA(tb[IFLA_MTU]); ifp->metric = 0; |
