summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bgpd/bgp_network.c4
-rw-r--r--bgpd/bgp_zebra.c6
-rw-r--r--bgpd/bgpd.c2
-rw-r--r--isisd/isis_te.c2
-rw-r--r--ldpd/ldp_vty_conf.c12
-rw-r--r--lib/if.c20
-rw-r--r--lib/if.h5
-rw-r--r--nhrpd/nhrp_interface.c2
-rw-r--r--ospf6d/ospf6_asbr.c2
-rw-r--r--ospf6d/ospf6_interface.c6
-rw-r--r--ospf6d/ospf6_top.c2
-rw-r--r--ospfd/ospf_routemap.c3
-rw-r--r--ospfd/ospf_te.c2
-rw-r--r--ospfd/ospf_vty.c8
-rw-r--r--pimd/pim_cmd.c8
-rw-r--r--pimd/pim_iface.c4
-rw-r--r--ripd/rip_routemap.c3
-rw-r--r--ripd/ripd.c4
-rw-r--r--ripngd/ripng_routemap.c2
-rw-r--r--ripngd/ripngd.c4
-rw-r--r--zebra/if_ioctl.c2
-rw-r--r--zebra/interface.c4
-rw-r--r--zebra/kernel_socket.c2
-rw-r--r--zebra/zebra_vrf.c2
-rw-r--r--zebra/zebra_vty.c6
25 files changed, 56 insertions, 61 deletions
diff --git a/bgpd/bgp_network.c b/bgpd/bgp_network.c
index 1358ebc5e..b85dcf6c4 100644
--- a/bgpd/bgp_network.c
+++ b/bgpd/bgp_network.c
@@ -262,7 +262,7 @@ bgp_get_instance_for_inc_conn (int sock, struct bgp **bgp_inst)
if (bgp->inst_type == BGP_INSTANCE_TYPE_VIEW)
continue;
- ifp = if_lookup_by_name_vrf (name, bgp->vrf_id);
+ ifp = if_lookup_by_name (name, bgp->vrf_id);
if (ifp)
{
*bgp_inst = bgp;
@@ -544,7 +544,7 @@ bgp_update_source (struct peer *peer)
/* Source is specified with interface name. */
if (peer->update_if)
{
- ifp = if_lookup_by_name_vrf (peer->update_if, peer->bgp->vrf_id);
+ ifp = if_lookup_by_name (peer->update_if, peer->bgp->vrf_id);
if (! ifp)
return -1;
diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c
index 2a513dda2..32ad87cb7 100644
--- a/bgpd/bgp_zebra.c
+++ b/bgpd/bgp_zebra.c
@@ -1026,7 +1026,7 @@ bgp_nexthop_set (union sockunion *local, union sockunion *remote,
{
nexthop->v4 = local->sin.sin_addr;
if (peer->update_if)
- ifp = if_lookup_by_name_vrf (peer->update_if, peer->bgp->vrf_id);
+ ifp = if_lookup_by_name (peer->update_if, peer->bgp->vrf_id);
else
ifp = if_lookup_by_ipv4_exact (&local->sin.sin_addr, peer->bgp->vrf_id);
}
@@ -1035,10 +1035,10 @@ bgp_nexthop_set (union sockunion *local, union sockunion *remote,
if (IN6_IS_ADDR_LINKLOCAL (&local->sin6.sin6_addr))
{
if (peer->conf_if || peer->ifname)
- ifp = if_lookup_by_name_vrf (peer->conf_if ? peer->conf_if : peer->ifname, peer->bgp->vrf_id);
+ ifp = if_lookup_by_name (peer->conf_if ? peer->conf_if : peer->ifname, peer->bgp->vrf_id);
}
else if (peer->update_if)
- ifp = if_lookup_by_name_vrf (peer->update_if, peer->bgp->vrf_id);
+ ifp = if_lookup_by_name (peer->update_if, peer->bgp->vrf_id);
else
ifp = if_lookup_by_ipv6_exact (&local->sin6.sin6_addr,
local->sin6.sin6_scope_id,
diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c
index ce0718df5..30243e80b 100644
--- a/bgpd/bgpd.c
+++ b/bgpd/bgpd.c
@@ -1435,7 +1435,7 @@ bgp_peer_conf_if_to_su_update (struct peer *peer)
return;
prev_family = peer->su.sa.sa_family;
- if ((ifp = if_lookup_by_name_vrf (peer->conf_if, peer->bgp->vrf_id)))
+ if ((ifp = if_lookup_by_name (peer->conf_if, peer->bgp->vrf_id)))
{
peer->ifp = ifp;
/* If BGP unnumbered is not "v6only", we first see if we can derive the
diff --git a/isisd/isis_te.c b/isisd/isis_te.c
index 830ccb37c..b04d0db3c 100644
--- a/isisd/isis_te.c
+++ b/isisd/isis_te.c
@@ -1323,7 +1323,7 @@ DEFUN (show_isis_mpls_te_interface,
/* Interface name is specified. */
else
{
- if ((ifp = if_lookup_by_name (argv[idx_interface]->arg)) == NULL)
+ if ((ifp = if_lookup_by_name (argv[idx_interface]->arg, VRF_DEFAULT)) == NULL)
vty_out (vty, "No such interface name%s", VTY_NEWLINE);
else
show_mpls_te_sub (vty, ifp);
diff --git a/ldpd/ldp_vty_conf.c b/ldpd/ldp_vty_conf.c
index 4d1af6214..f313bc147 100644
--- a/ldpd/ldp_vty_conf.c
+++ b/ldpd/ldp_vty_conf.c
@@ -900,7 +900,7 @@ ldp_vty_interface(struct vty *vty, struct vty_arg *args[])
goto cancel;
}
- ifp = if_lookup_by_name(ifname);
+ ifp = if_lookup_by_name(ifname, VRF_DEFAULT);
memset(&kif, 0, sizeof(kif));
strlcpy(kif.ifname, ifname, sizeof(kif.ifname));
if (ifp) {
@@ -1558,7 +1558,7 @@ ldp_vty_l2vpn_interface(struct vty *vty, struct vty_arg *args[])
goto cancel;
}
- ifp = if_lookup_by_name(ifname);
+ ifp = if_lookup_by_name(ifname, VRF_DEFAULT);
memset(&kif, 0, sizeof(kif));
strlcpy(kif.ifname, ifname, sizeof(kif.ifname));
if (ifp) {
@@ -1616,7 +1616,7 @@ ldp_vty_l2vpn_pseudowire(struct vty *vty, struct vty_arg *args[])
goto cancel;
}
- ifp = if_lookup_by_name(ifname);
+ ifp = if_lookup_by_name(ifname, VRF_DEFAULT);
memset(&kif, 0, sizeof(kif));
strlcpy(kif.ifname, ifname, sizeof(kif.ifname));
if (ifp) {
@@ -1809,7 +1809,7 @@ iface_new_api(struct ldpd_conf *conf, const char *name)
memset(&kif, 0, sizeof(kif));
strlcpy(kif.ifname, ifname, sizeof(kif.ifname));
- ifp = if_lookup_by_name(ifname);
+ ifp = if_lookup_by_name(ifname, VRF_DEFAULT);
if (ifp) {
kif.ifindex = ifp->ifindex;
kif.flags = ifp->flags;
@@ -1920,7 +1920,7 @@ l2vpn_if_new_api(struct ldpd_conf *conf, struct l2vpn *l2vpn,
memset(&kif, 0, sizeof(kif));
strlcpy(kif.ifname, ifname, sizeof(kif.ifname));
- ifp = if_lookup_by_name(ifname);
+ ifp = if_lookup_by_name(ifname, VRF_DEFAULT);
if (ifp) {
kif.ifindex = ifp->ifindex;
kif.flags = ifp->flags;
@@ -1951,7 +1951,7 @@ l2vpn_pw_new_api(struct ldpd_conf *conf, struct l2vpn *l2vpn,
memset(&kif, 0, sizeof(kif));
strlcpy(kif.ifname, ifname, sizeof(kif.ifname));
- ifp = if_lookup_by_name(ifname);
+ ifp = if_lookup_by_name(ifname, VRF_DEFAULT);
if (ifp) {
kif.ifindex = ifp->ifindex;
kif.flags = ifp->flags;
diff --git a/lib/if.c b/lib/if.c
index 4c8f16d37..4f2eb3a1c 100644
--- a/lib/if.c
+++ b/lib/if.c
@@ -136,7 +136,7 @@ if_create (const char *name, int namelen, vrf_id_t vrf_id)
strncpy (ifp->name, name, namelen);
ifp->name[namelen] = '\0';
ifp->vrf_id = vrf_id;
- if (if_lookup_by_name_vrf (ifp->name, vrf_id) == NULL)
+ if (if_lookup_by_name (ifp->name, vrf_id) == NULL)
listnode_add_sort (intf_list, ifp);
else
zlog_err("if_create(%s): corruption detected -- interface with this "
@@ -173,7 +173,7 @@ if_update_vrf (struct interface *ifp, const char *name, int namelen, vrf_id_t vr
strncpy (ifp->name, name, namelen);
ifp->name[namelen] = '\0';
ifp->vrf_id = vrf_id;
- if (if_lookup_by_name_vrf (ifp->name, vrf_id) == NULL)
+ if (if_lookup_by_name (ifp->name, vrf_id) == NULL)
listnode_add_sort (intf_list, ifp);
else
zlog_err("if_create(%s): corruption detected -- interface with this "
@@ -266,7 +266,7 @@ ifname2ifindex_vrf (const char *name, vrf_id_t vrf_id)
{
struct interface *ifp;
- return ((ifp = if_lookup_by_name_vrf (name, vrf_id)) != NULL) ? ifp->ifindex
+ return ((ifp = if_lookup_by_name (name, vrf_id)) != NULL) ? ifp->ifindex
: IFINDEX_INTERNAL;
}
@@ -278,7 +278,7 @@ ifname2ifindex (const char *name)
/* Interface existance check by interface name. */
struct interface *
-if_lookup_by_name_vrf (const char *name, vrf_id_t vrf_id)
+if_lookup_by_name (const char *name, vrf_id_t vrf_id)
{
struct listnode *node;
struct interface *ifp;
@@ -300,7 +300,7 @@ if_lookup_by_name_all_vrf (const char *name)
RB_FOREACH (vrf, vrf_id_head, &vrfs_by_id)
{
- ifp = if_lookup_by_name_vrf (name, vrf->vrf_id);
+ ifp = if_lookup_by_name (name, vrf->vrf_id);
if (ifp)
return ifp;
}
@@ -309,12 +309,6 @@ if_lookup_by_name_all_vrf (const char *name)
}
struct interface *
-if_lookup_by_name (const char *name)
-{
- return if_lookup_by_name_vrf (name, VRF_DEFAULT);
-}
-
-struct interface *
if_lookup_by_name_len (const char *name, size_t namelen, vrf_id_t vrf_id)
{
struct listnode *node;
@@ -437,7 +431,7 @@ if_get_by_name_vrf (const char *name, vrf_id_t vrf_id)
{
struct interface *ifp;
- return ((ifp = if_lookup_by_name_vrf (name, vrf_id)) != NULL) ? ifp :
+ return ((ifp = if_lookup_by_name (name, vrf_id)) != NULL) ? ifp :
if_create (name, strlen(name), vrf_id);
}
@@ -771,7 +765,7 @@ DEFUN_NOSH (no_interface,
if (argc > 3)
VRF_GET_ID (vrf_id, vrfname);
- ifp = if_lookup_by_name_vrf (ifname, vrf_id);
+ ifp = if_lookup_by_name (ifname, vrf_id);
if (ifp == NULL)
{
diff --git a/lib/if.h b/lib/if.h
index 7a0e6042b..262e292ac 100644
--- a/lib/if.h
+++ b/lib/if.h
@@ -404,12 +404,11 @@ extern struct interface *if_lookup_prefix (struct prefix *prefix,
/* These 2 functions are to be used when the ifname argument is terminated
by a '\0' character: */
-extern struct interface *if_lookup_by_name (const char *ifname);
extern struct interface *if_get_by_name (const char *ifname);
extern struct interface *if_lookup_by_name_all_vrf (const char *ifname);
-extern struct interface *if_lookup_by_name_vrf (const char *ifname,
- vrf_id_t vrf_id);
+extern struct interface *if_lookup_by_name (const char *ifname,
+ vrf_id_t vrf_id);
extern struct interface *if_get_by_name_vrf (const char *ifname,
vrf_id_t vrf_id);
diff --git a/nhrpd/nhrp_interface.c b/nhrpd/nhrp_interface.c
index 052b9c1e8..bbaa630cd 100644
--- a/nhrpd/nhrp_interface.c
+++ b/nhrpd/nhrp_interface.c
@@ -117,7 +117,7 @@ static void nhrp_interface_update_nbma(struct interface *ifp)
sockunion_family(&nbma) = AF_UNSPEC;
if (nifp->source)
- nbmaifp = if_lookup_by_name(nifp->source);
+ nbmaifp = if_lookup_by_name(nifp->source, VRF_DEFAULT);
switch (ifp->ll_type) {
case ZEBRA_LLT_IPGRE: {
diff --git a/ospf6d/ospf6_asbr.c b/ospf6d/ospf6_asbr.c
index 5f2d662b7..8caae5022 100644
--- a/ospf6d/ospf6_asbr.c
+++ b/ospf6d/ospf6_asbr.c
@@ -866,7 +866,7 @@ ospf6_routemap_rule_match_interface (void *rule, struct prefix *prefix,
if (type == RMAP_OSPF6)
{
ei = ((struct ospf6_route *) object)->route_option;
- ifp = if_lookup_by_name ((char *)rule);
+ ifp = if_lookup_by_name ((char *)rule, VRF_DEFAULT);
if (ifp != NULL
&& ei->ifindex == ifp->ifindex)
diff --git a/ospf6d/ospf6_interface.c b/ospf6d/ospf6_interface.c
index 62c77e6f8..8e0779df9 100644
--- a/ospf6d/ospf6_interface.c
+++ b/ospf6d/ospf6_interface.c
@@ -1006,7 +1006,7 @@ DEFUN (show_ipv6_ospf6_interface,
if (argc == 5)
{
- ifp = if_lookup_by_name (argv[idx_ifname]->arg);
+ ifp = if_lookup_by_name (argv[idx_ifname]->arg, VRF_DEFAULT);
if (ifp == NULL)
{
vty_out (vty, "No such Interface: %s%s", argv[idx_ifname]->arg,
@@ -1043,7 +1043,7 @@ DEFUN (show_ipv6_ospf6_interface_ifname_prefix,
struct interface *ifp;
struct ospf6_interface *oi;
- ifp = if_lookup_by_name (argv[idx_ifname]->arg);
+ ifp = if_lookup_by_name (argv[idx_ifname]->arg, VRF_DEFAULT);
if (ifp == NULL)
{
vty_out (vty, "No such Interface: %s%s", argv[idx_ifname]->arg, VNL);
@@ -1897,7 +1897,7 @@ DEFUN (clear_ipv6_ospf6_interface,
}
else /* Interface name is specified. */
{
- if ((ifp = if_lookup_by_name (argv[idx_ifname]->arg)) == NULL)
+ if ((ifp = if_lookup_by_name (argv[idx_ifname]->arg, VRF_DEFAULT)) == NULL)
{
vty_out (vty, "No such Interface: %s%s", argv[idx_ifname]->arg, VNL);
return CMD_WARNING;
diff --git a/ospf6d/ospf6_top.c b/ospf6d/ospf6_top.c
index 92111c73f..9e741d07d 100644
--- a/ospf6d/ospf6_top.c
+++ b/ospf6d/ospf6_top.c
@@ -728,7 +728,7 @@ DEFUN (no_ospf6_interface_area,
struct interface *ifp;
u_int32_t area_id;
- ifp = if_lookup_by_name (argv[idx_ifname]->arg);
+ ifp = if_lookup_by_name (argv[idx_ifname]->arg, VRF_DEFAULT);
if (ifp == NULL)
{
vty_out (vty, "No such interface %s%s", argv[idx_ifname]->arg, VNL);
diff --git a/ospfd/ospf_routemap.c b/ospfd/ospf_routemap.c
index 717dc25f9..db51abca2 100644
--- a/ospfd/ospf_routemap.c
+++ b/ospfd/ospf_routemap.c
@@ -32,6 +32,7 @@
#include "command.h"
#include "log.h"
#include "plist.h"
+#include "vrf.h"
#include "ospfd/ospfd.h"
#include "ospfd/ospf_asbr.h"
@@ -360,7 +361,7 @@ route_match_interface (void *rule, struct prefix *prefix,
if (type == RMAP_OSPF)
{
ei = object;
- ifp = if_lookup_by_name ((char *)rule);
+ ifp = if_lookup_by_name ((char *)rule, VRF_DEFAULT);
if (ifp == NULL || ifp->ifindex != ei->ifindex)
return RMAP_NOMATCH;
diff --git a/ospfd/ospf_te.c b/ospfd/ospf_te.c
index 4c5862e84..449f9e7b9 100644
--- a/ospfd/ospf_te.c
+++ b/ospfd/ospf_te.c
@@ -2630,7 +2630,7 @@ DEFUN (show_ip_ospf_mpls_te_link,
/* Interface name is specified. */
else
{
- if ((ifp = if_lookup_by_name (argv[idx_interface]->arg)) == NULL)
+ if ((ifp = if_lookup_by_name (argv[idx_interface]->arg, VRF_DEFAULT)) == NULL)
vty_out (vty, "No such interface name%s", VTY_NEWLINE);
else
show_mpls_te_link_sub (vty, ifp);
diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c
index 33fc0bf52..cc3b47c0c 100644
--- a/ospfd/ospf_vty.c
+++ b/ospfd/ospf_vty.c
@@ -3592,7 +3592,7 @@ show_ip_ospf_interface_common (struct vty *vty, struct ospf *ospf, int argc,
else
{
/* Interface name is specified. */
- if ((ifp = if_lookup_by_name (argv[iface_argv]->arg)) == NULL)
+ if ((ifp = if_lookup_by_name (argv[iface_argv]->arg, VRF_DEFAULT)) == NULL)
{
if (use_json)
json_object_boolean_true_add(json, "noSuchIface");
@@ -3950,7 +3950,7 @@ show_ip_ospf_neighbor_int_common (struct vty *vty, struct ospf *ospf, int arg_ba
VTY_NEWLINE, VTY_NEWLINE);
}
- ifp = if_lookup_by_name (argv[arg_base]->arg);
+ ifp = if_lookup_by_name (argv[arg_base]->arg, VRF_DEFAULT);
if (!ifp)
{
if (use_json)
@@ -4609,7 +4609,7 @@ show_ip_ospf_neighbor_int_detail_common (struct vty *vty, struct ospf *ospf,
VTY_NEWLINE, VTY_NEWLINE);
}
- ifp = if_lookup_by_name (argv[arg_base]->arg);
+ ifp = if_lookup_by_name (argv[arg_base]->arg, VRF_DEFAULT);
if (!ifp)
{
if (!use_json)
@@ -9142,7 +9142,7 @@ DEFUN (clear_ip_ospf_interface,
}
else /* Interface name is specified. */
{
- if ((ifp = if_lookup_by_name (argv[idx_ifname]->text)) == NULL)
+ if ((ifp = if_lookup_by_name (argv[idx_ifname]->text, VRF_DEFAULT)) == NULL)
vty_out (vty, "No such interface name%s", VTY_NEWLINE);
else
ospf_interface_clear(ifp);
diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c
index 465c368f4..081f62b90 100644
--- a/pimd/pim_cmd.c
+++ b/pimd/pim_cmd.c
@@ -4418,7 +4418,7 @@ DEFUN (interface_ip_mroute,
int result;
oifname = argv[idx_interface]->arg;
- oif = if_lookup_by_name(oifname);
+ oif = if_lookup_by_name(oifname, VRF_DEFAULT);
if (!oif) {
vty_out(vty, "No such interface name %s%s",
oifname, VTY_NEWLINE);
@@ -4465,7 +4465,7 @@ DEFUN (interface_ip_mroute_source,
int result;
oifname = argv[idx_interface]->arg;
- oif = if_lookup_by_name(oifname);
+ oif = if_lookup_by_name(oifname, VRF_DEFAULT);
if (!oif) {
vty_out(vty, "No such interface name %s%s",
oifname, VTY_NEWLINE);
@@ -4516,7 +4516,7 @@ DEFUN (interface_no_ip_mroute,
int result;
oifname = argv[idx_interface]->arg;
- oif = if_lookup_by_name(oifname);
+ oif = if_lookup_by_name(oifname, VRF_DEFAULT);
if (!oif) {
vty_out(vty, "No such interface name %s%s",
oifname, VTY_NEWLINE);
@@ -4564,7 +4564,7 @@ DEFUN (interface_no_ip_mroute_source,
int result;
oifname = argv[idx_interface]->arg;
- oif = if_lookup_by_name(oifname);
+ oif = if_lookup_by_name(oifname, VRF_DEFAULT);
if (!oif) {
vty_out(vty, "No such interface name %s%s",
oifname, VTY_NEWLINE);
diff --git a/pimd/pim_iface.c b/pimd/pim_iface.c
index 76687cea3..086479643 100644
--- a/pimd/pim_iface.c
+++ b/pimd/pim_iface.c
@@ -858,7 +858,7 @@ pim_find_primary_addr (struct interface *ifp)
if (!v4_addrs && v6_addrs && !if_is_loopback (ifp))
{
struct interface *lo_ifp;
- lo_ifp = if_lookup_by_name_vrf ("lo", VRF_DEFAULT);
+ lo_ifp = if_lookup_by_name ("lo", VRF_DEFAULT);
if (lo_ifp)
return pim_find_primary_addr (lo_ifp);
}
@@ -1005,7 +1005,7 @@ struct interface *pim_if_find_by_vif_index(ifindex_t vif_index)
struct interface *ifp;
if (vif_index == 0)
- return if_lookup_by_name_vrf ("pimreg", VRF_DEFAULT);
+ return if_lookup_by_name ("pimreg", VRF_DEFAULT);
for (ALL_LIST_ELEMENTS_RO (vrf_iflist (VRF_DEFAULT), ifnode, ifp)) {
if (ifp->info) {
diff --git a/ripd/rip_routemap.c b/ripd/rip_routemap.c
index 6fd647596..baba9592e 100644
--- a/ripd/rip_routemap.c
+++ b/ripd/rip_routemap.c
@@ -31,6 +31,7 @@
#include "log.h"
#include "sockunion.h" /* for inet_aton () */
#include "plist.h"
+#include "vrf.h"
#include "ripd/ripd.h"
@@ -136,7 +137,7 @@ route_match_interface (void *rule, struct prefix *prefix,
if (type == RMAP_RIP)
{
ifname = rule;
- ifp = if_lookup_by_name(ifname);
+ ifp = if_lookup_by_name(ifname, VRF_DEFAULT);
if (!ifp)
return RMAP_NOMATCH;
diff --git a/ripd/ripd.c b/ripd/ripd.c
index abc2faf2e..fab31b322 100644
--- a/ripd/ripd.c
+++ b/ripd/ripd.c
@@ -3763,7 +3763,7 @@ rip_distribute_update (struct distribute *dist)
if (! dist->ifname)
return;
- ifp = if_lookup_by_name (dist->ifname);
+ ifp = if_lookup_by_name (dist->ifname, VRF_DEFAULT);
if (ifp == NULL)
return;
@@ -3962,7 +3962,7 @@ rip_if_rmap_update (struct if_rmap *if_rmap)
struct rip_interface *ri;
struct route_map *rmap;
- ifp = if_lookup_by_name (if_rmap->ifname);
+ ifp = if_lookup_by_name (if_rmap->ifname, VRF_DEFAULT);
if (ifp == NULL)
return;
diff --git a/ripngd/ripng_routemap.c b/ripngd/ripng_routemap.c
index 7cab5861b..ad8dbc92f 100644
--- a/ripngd/ripng_routemap.c
+++ b/ripngd/ripng_routemap.c
@@ -110,7 +110,7 @@ route_match_interface (void *rule, struct prefix *prefix,
if (type == RMAP_RIPNG)
{
ifname = rule;
- ifp = if_lookup_by_name(ifname);
+ ifp = if_lookup_by_name(ifname, VRF_DEFAULT);
if (!ifp)
return RMAP_NOMATCH;
diff --git a/ripngd/ripngd.c b/ripngd/ripngd.c
index 8e98f5b0e..591316e50 100644
--- a/ripngd/ripngd.c
+++ b/ripngd/ripngd.c
@@ -2814,7 +2814,7 @@ ripng_distribute_update (struct distribute *dist)
if (! dist->ifname)
return;
- ifp = if_lookup_by_name (dist->ifname);
+ ifp = if_lookup_by_name (dist->ifname, VRF_DEFAULT);
if (ifp == NULL)
return;
@@ -3009,7 +3009,7 @@ ripng_if_rmap_update (struct if_rmap *if_rmap)
struct ripng_interface *ri;
struct route_map *rmap;
- ifp = if_lookup_by_name (if_rmap->ifname);
+ ifp = if_lookup_by_name (if_rmap->ifname, VRF_DEFAULT);
if (ifp == NULL)
return;
diff --git a/zebra/if_ioctl.c b/zebra/if_ioctl.c
index a4498a84f..2393e0f9c 100644
--- a/zebra/if_ioctl.c
+++ b/zebra/if_ioctl.c
@@ -201,7 +201,7 @@ if_getaddrs (void)
continue;
}
- ifp = if_lookup_by_name (ifap->ifa_name);
+ ifp = if_lookup_by_name (ifap->ifa_name, VRF_DEFAULT);
if (ifp == NULL)
{
zlog_err ("if_getaddrs(): Can't lookup interface %s\n",
diff --git a/zebra/interface.c b/zebra/interface.c
index 5a9de5b70..902e53dc5 100644
--- a/zebra/interface.c
+++ b/zebra/interface.c
@@ -1320,7 +1320,7 @@ DEFUN (show_interface_name_vrf,
VRF_GET_ID (vrf_id, argv[idx_name]->arg);
/* Specified interface print. */
- ifp = if_lookup_by_name_vrf (argv[idx_ifname]->arg, vrf_id);
+ ifp = if_lookup_by_name (argv[idx_ifname]->arg, vrf_id);
if (ifp == NULL)
{
vty_out (vty, "%% Can't find interface %s%s", argv[idx_ifname]->arg,
@@ -1352,7 +1352,7 @@ DEFUN (show_interface_name_vrf_all,
RB_FOREACH (vrf, vrf_name_head, &vrfs_by_name)
{
/* Specified interface print. */
- ifp = if_lookup_by_name_vrf (argv[idx_ifname]->arg, vrf->vrf_id);
+ ifp = if_lookup_by_name (argv[idx_ifname]->arg, vrf->vrf_id);
if (ifp)
{
if_dump_vty (vty, ifp);
diff --git a/zebra/kernel_socket.c b/zebra/kernel_socket.c
index ad04e1a8a..fee7bce1c 100644
--- a/zebra/kernel_socket.c
+++ b/zebra/kernel_socket.c
@@ -487,7 +487,7 @@ ifm_read (struct if_msghdr *ifm)
* be filled in.
*/
if ( (ifp == NULL) && ifnlen)
- ifp = if_lookup_by_name (ifname);
+ ifp = if_lookup_by_name (ifname, VRF_DEFAULT);
/*
* If ifp still does not exist or has an invalid index (IFINDEX_INTERNAL),
diff --git a/zebra/zebra_vrf.c b/zebra/zebra_vrf.c
index 6fc41c3a1..bc18ee586 100644
--- a/zebra/zebra_vrf.c
+++ b/zebra/zebra_vrf.c
@@ -171,7 +171,7 @@ zebra_vrf_enable (struct vrf *vrf)
si->vrf_id = vrf->vrf_id;
if (si->ifindex)
{
- ifp = if_lookup_by_name_vrf (si->ifname, si->vrf_id);
+ ifp = if_lookup_by_name (si->ifname, si->vrf_id);
if (ifp)
si->ifindex = ifp->ifindex;
else
diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c
index 7946089ae..1c315670b 100644
--- a/zebra/zebra_vty.c
+++ b/zebra/zebra_vty.c
@@ -184,7 +184,7 @@ zebra_static_ipv4 (struct vty *vty, safi_t safi, int add_cmd,
ret = inet_aton (gate_str, &gate);
if (!ret)
{
- struct interface *ifp = if_lookup_by_name_vrf (gate_str, zvrf_id (zvrf));
+ struct interface *ifp = if_lookup_by_name (gate_str, zvrf_id (zvrf));
if (!ifp)
{
vty_out (vty, "%% Unknown interface: %s%s", gate_str, VTY_NEWLINE);
@@ -2459,7 +2459,7 @@ static_ipv6_func (struct vty *vty, int add_cmd, const char *dest_str,
}
type = STATIC_IPV6_GATEWAY_IFINDEX;
gate = &gate_addr;
- ifp = if_lookup_by_name_vrf (ifname, zvrf_id (zvrf));
+ ifp = if_lookup_by_name (ifname, zvrf_id (zvrf));
if (!ifp)
{
vty_out (vty, "%% Malformed Interface name %s%s", ifname, VTY_NEWLINE);
@@ -2477,7 +2477,7 @@ static_ipv6_func (struct vty *vty, int add_cmd, const char *dest_str,
else
{
type = STATIC_IFINDEX;
- ifp = if_lookup_by_name_vrf (gate_str, zvrf_id (zvrf));
+ ifp = if_lookup_by_name (gate_str, zvrf_id (zvrf));
if (!ifp)
{
vty_out (vty, "%% Malformed Interface name %s%s", gate_str, VTY_NEWLINE);