summaryrefslogtreecommitdiffstats
path: root/ripd
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 /ripd
parentlib, ospfd, pimd, zebra: change if_create() api with vrf (diff)
downloadfrr-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 'ripd')
-rw-r--r--ripd/rip_routemap.c3
-rw-r--r--ripd/ripd.c4
2 files changed, 4 insertions, 3 deletions
diff --git a/ripd/rip_routemap.c b/ripd/rip_routemap.c
index 3216b8f89..3f8b9cb76 100644
--- a/ripd/rip_routemap.c
+++ b/ripd/rip_routemap.c
@@ -106,7 +106,8 @@ static route_map_result_t route_match_interface(void *rule,
if (type == RMAP_RIP) {
ifname = rule;
- ifp = if_lookup_by_name(ifname, VRF_DEFAULT);
+ ifp = if_lookup_by_name(ifname,
+ vrf_lookup_by_id(VRF_DEFAULT));
if (!ifp)
return RMAP_NOMATCH;
diff --git a/ripd/ripd.c b/ripd/ripd.c
index 3a1ffd17a..72af5326b 100644
--- a/ripd/ripd.c
+++ b/ripd/ripd.c
@@ -3299,7 +3299,7 @@ static void rip_distribute_update(struct distribute_ctx *ctx,
if (!ctx->vrf || !dist->ifname)
return;
- ifp = if_lookup_by_name(dist->ifname, ctx->vrf->vrf_id);
+ ifp = if_lookup_by_name(dist->ifname, ctx->vrf);
if (ifp == NULL)
return;
@@ -3418,7 +3418,7 @@ static void rip_if_rmap_update(struct if_rmap_ctx *ctx,
if (ctx->name)
vrf = vrf_lookup_by_name(ctx->name);
if (vrf)
- ifp = if_lookup_by_name(if_rmap->ifname, vrf->vrf_id);
+ ifp = if_lookup_by_name(if_rmap->ifname, vrf);
if (ifp == NULL)
return;