}
if (peer->conf_if || peer->ifname)
- ifindex = ifname2ifindex (peer->conf_if ? peer->conf_if : peer->ifname);
+ ifindex = ifname2ifindex (peer->conf_if ? peer->conf_if : peer->ifname, peer->bgp->vrf_id);
if (bgp_debug_neighbor_events(peer))
zlog_debug ("%s [Event] Connect start to %s fd %d",
if (!ifindex)
{
if (mpinfo->peer->conf_if || mpinfo->peer->ifname)
- ifindex = ifname2ifindex (mpinfo->peer->conf_if ? mpinfo->peer->conf_if : mpinfo->peer->ifname);
+ ifindex = ifname2ifindex (mpinfo->peer->conf_if ? mpinfo->peer->conf_if : mpinfo->peer->ifname, bgp->vrf_id);
else if (mpinfo->peer->nexthop.ifp)
ifindex = mpinfo->peer->nexthop.ifp->ifindex;
}
}
ifindex_t
-ifname2ifindex_vrf (const char *name, vrf_id_t vrf_id)
+ifname2ifindex (const char *name, vrf_id_t vrf_id)
{
struct interface *ifp;
: IFINDEX_INTERNAL;
}
-ifindex_t
-ifname2ifindex (const char *name)
-{
- return ifname2ifindex_vrf (name, VRF_DEFAULT);
-}
-
/* Interface existance check by interface name. */
struct interface *
if_lookup_by_name (const char *name, vrf_id_t vrf_id)
/* Please use ifname2ifindex instead of if_nametoindex where possible;
ifname2ifindex uses internal interface info, whereas if_nametoindex must
make a system call. */
-extern ifindex_t ifname2ifindex(const char *ifname);
-extern ifindex_t ifname2ifindex_vrf(const char *ifname, vrf_id_t vrf_id);
+extern ifindex_t ifname2ifindex(const char *ifname, vrf_id_t vrf_id);
/* Connected address functions. */
extern struct connected *connected_new (void);
nh_data = object;
if (!nh_data || !nh_data->nexthop)
return RMAP_NOMATCH;
- ifindex = ifname2ifindex_vrf (ifname, nh_data->vrf_id);
+ ifindex = ifname2ifindex (ifname, nh_data->vrf_id);
if (ifindex == 0)
return RMAP_NOMATCH;
if (nh_data->nexthop->ifindex == ifindex)