summaryrefslogtreecommitdiff
path: root/babeld/babel_interface.c
diff options
context:
space:
mode:
authorPhilippe Guibert <philippe.guibert@6wind.com>2019-02-11 15:46:48 +0100
committerPhilippe Guibert <philippe.guibert@6wind.com>2019-06-12 08:37:54 +0200
commitf11e98eca3c4b4e3c91c826329018e848bcb9fc6 (patch)
treeace27e5cf229093071ea7f0c00029920b4d8c46e /babeld/babel_interface.c
parente9c199a6c12ad8359d1792462545595d4679d20b (diff)
*: change if_lookup_by_name() api with vrf
the vrf_id parameter is replaced by struct vrf * parameter. this impacts most of the daemons that look for an interface based on the name and the vrf identifier. Also, it fixes 2 lookup calls in zebra and sharpd, where the vrf_id was ignored until now. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to 'babeld/babel_interface.c')
-rw-r--r--babeld/babel_interface.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/babeld/babel_interface.c b/babeld/babel_interface.c
index b84bc39cd8..45b10ebd79 100644
--- a/babeld/babel_interface.c
+++ b/babeld/babel_interface.c
@@ -241,7 +241,7 @@ babel_enable_if_add (const char *ifname)
vector_set (babel_enable_if, strdup (ifname));
- ifp = if_lookup_by_name(ifname, VRF_DEFAULT);
+ ifp = if_lookup_by_name(ifname, vrf_lookup_by_id(VRF_DEFAULT));
if (ifp != NULL)
interface_recalculate(ifp);
@@ -264,7 +264,7 @@ babel_enable_if_delete (const char *ifname)
free (str);
vector_unset (babel_enable_if, babel_enable_if_index);
- ifp = if_lookup_by_name(ifname, VRF_DEFAULT);
+ ifp = if_lookup_by_name(ifname, vrf_lookup_by_id(VRF_DEFAULT));
if (ifp != NULL)
interface_reset(ifp);
@@ -907,7 +907,8 @@ DEFUN (show_babel_interface,
show_babel_interface_sub (vty, ifp);
return CMD_SUCCESS;
}
- if ((ifp = if_lookup_by_name (argv[3]->arg, VRF_DEFAULT)) == NULL)
+ if ((ifp = if_lookup_by_name (argv[3]->arg,
+ vrf_lookup_by_id(VRF_DEFAULT))) == NULL)
{
vty_out (vty, "No such interface name\n");
return CMD_WARNING;
@@ -949,7 +950,8 @@ DEFUN (show_babel_neighbour,
}
return CMD_SUCCESS;
}
- if ((ifp = if_lookup_by_name (argv[3]->arg, VRF_DEFAULT)) == NULL)
+ if ((ifp = if_lookup_by_name (argv[3]->arg,
+ vrf_lookup_by_id(VRF_DEFAULT))) == NULL)
{
vty_out (vty, "No such interface name\n");
return CMD_WARNING;