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 /staticd/static_routes.c | |
| parent | e9c199a6c12ad8359d1792462545595d4679d20b (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 'staticd/static_routes.c')
| -rw-r--r-- | staticd/static_routes.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/staticd/static_routes.c b/staticd/static_routes.c index 5f9ecad694..9c012c4751 100644 --- a/staticd/static_routes.c +++ b/staticd/static_routes.c @@ -187,7 +187,7 @@ int static_add_route(afi_t afi, safi_t safi, uint8_t type, struct prefix *p, else { struct interface *ifp; - ifp = if_lookup_by_name(ifname, nh_svrf->vrf->vrf_id); + ifp = if_lookup_by_name(ifname, nh_svrf->vrf); if (ifp && ifp->ifindex != IFINDEX_INTERNAL) { si->ifindex = ifp->ifindex; static_install_route(rn, si, safi); @@ -331,8 +331,7 @@ static void static_fixup_vrf(struct static_vrf *svrf, si->nh_vrf_id = svrf->vrf->vrf_id; si->nh_registered = false; if (si->ifindex) { - ifp = if_lookup_by_name(si->ifname, - si->nh_vrf_id); + ifp = if_lookup_by_name(si->ifname, svrf->vrf); if (ifp) si->ifindex = ifp->ifindex; else @@ -367,7 +366,8 @@ static void static_enable_vrf(struct static_vrf *svrf, si->vrf_id = vrf->vrf_id; if (si->ifindex) { ifp = if_lookup_by_name(si->ifname, - si->nh_vrf_id); + vrf_lookup_by_id( + si->nh_vrf_id)); if (ifp) si->ifindex = ifp->ifindex; else |
