diff options
author | Philippe Guibert <philippe.guibert@6wind.com> | 2019-02-11 15:46:48 +0100 |
---|---|---|
committer | Philippe Guibert <philippe.guibert@6wind.com> | 2019-06-12 08:37:54 +0200 |
commit | f11e98eca3c4b4e3c91c826329018e848bcb9fc6 (patch) | |
tree | ace27e5cf229093071ea7f0c00029920b4d8c46e /babeld | |
parent | lib, ospfd, pimd, zebra: change if_create() api with vrf (diff) | |
download | frr-f11e98eca3c4b4e3c91c826329018e848bcb9fc6.tar.xz frr-f11e98eca3c4b4e3c91c826329018e848bcb9fc6.zip |
*: 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')
-rw-r--r-- | babeld/babel_interface.c | 10 | ||||
-rw-r--r-- | babeld/babeld.c | 2 |
2 files changed, 7 insertions, 5 deletions
diff --git a/babeld/babel_interface.c b/babeld/babel_interface.c index b84bc39cd..45b10ebd7 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; diff --git a/babeld/babeld.c b/babeld/babeld.c index 39451b435..298903f50 100644 --- a/babeld/babeld.c +++ b/babeld/babeld.c @@ -555,7 +555,7 @@ babel_distribute_update (struct distribute_ctx *ctx, struct distribute *dist) if (! dist->ifname) return; - ifp = if_lookup_by_name (dist->ifname, VRF_DEFAULT); + ifp = if_lookup_by_name (dist->ifname, vrf_lookup_by_id(VRF_DEFAULT)); if (ifp == NULL) return; |