summaryrefslogtreecommitdiff
path: root/zebra/zebra_vrf.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2017-08-08 13:39:38 -0400
committerGitHub <noreply@github.com>2017-08-08 13:39:38 -0400
commit76a86854181c27819e5cf71b12ae1fa5ccd9e02a (patch)
tree691b03e51b9c99874d4ef26f9ca9b29cbee1b199 /zebra/zebra_vrf.c
parentf66e92bc4856352dc4c1c81fa35b1dd570cd83e5 (diff)
parent06e0a0cb3c630c2b221fecd2f081348b36943a6e (diff)
Merge pull request #920 from opensourcerouting/static-routes-ifindex-update-3.0reindent-3.0-before
[3.0] fixup static routes' ifindexes when interfaces (dis)appear
Diffstat (limited to 'zebra/zebra_vrf.c')
-rw-r--r--zebra/zebra_vrf.c44
1 files changed, 0 insertions, 44 deletions
diff --git a/zebra/zebra_vrf.c b/zebra/zebra_vrf.c
index 1797ef080c..06d87a468e 100644
--- a/zebra/zebra_vrf.c
+++ b/zebra/zebra_vrf.c
@@ -98,50 +98,6 @@ zebra_vrf_new (struct vrf *vrf)
return 0;
}
-/*
- * Moving an interface amongst different vrf's
- * causes the interface to get a new ifindex
- * so we need to find static routes with
- * the old ifindex and replace with new
- * ifindex to insert back into the table
- */
-void
-zebra_vrf_static_route_interface_fixup (struct interface *ifp)
-{
- afi_t afi;
- safi_t safi;
- struct zebra_vrf *zvrf = zebra_vrf_lookup_by_id (ifp->vrf_id);
- struct route_table *stable = NULL;
- struct route_node *rn = NULL;
- struct static_route *si = NULL;
-
- if (!zvrf)
- return;
-
- for (afi = AFI_IP; afi < AFI_MAX; afi++)
- {
- for (safi = SAFI_UNICAST ; safi < SAFI_MAX ; safi++)
- {
- stable = zvrf->stable[afi][safi];
- if (stable)
- for (rn = route_top (stable); rn; rn = route_next (rn))
- {
- if (rn->info)
- {
- si = rn->info;
- if ((strcmp (si->ifname, ifp->name) == 0) &&
- (si->ifindex != ifp->ifindex))
- {
- si->ifindex = ifp->ifindex;
- static_install_route (afi, safi, &rn->p, NULL, si);
- }
- }
- }
- }
- }
-
-}
-
/* Callback upon enabling a VRF. */
static int
zebra_vrf_enable (struct vrf *vrf)