summaryrefslogtreecommitdiffstats
path: root/ripngd
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 /ripngd
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 'ripngd')
-rw-r--r--ripngd/ripng_routemap.c3
-rw-r--r--ripngd/ripngd.c4
2 files changed, 4 insertions, 3 deletions
diff --git a/ripngd/ripng_routemap.c b/ripngd/ripng_routemap.c
index 0604e272c..874d81516 100644
--- a/ripngd/ripng_routemap.c
+++ b/ripngd/ripng_routemap.c
@@ -97,7 +97,8 @@ static route_map_result_t route_match_interface(void *rule,
if (type == RMAP_RIPNG) {
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/ripngd/ripngd.c b/ripngd/ripngd.c
index 71bc43049..67a52e9f0 100644
--- a/ripngd/ripngd.c
+++ b/ripngd/ripngd.c
@@ -2454,7 +2454,7 @@ static void ripng_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;
@@ -2571,7 +2571,7 @@ static void ripng_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;