]> git.proxmox.com Git - mirror_frr.git/blobdiff - zebra/zebra_vrf.c
Merge pull request #920 from opensourcerouting/static-routes-ifindex-update-3.0
[mirror_frr.git] / zebra / zebra_vrf.c
index 1797ef080c87599778881aa3139d2d7eb3355809..06d87a468edc50030cdc93fb2756f1851622dda4 100644 (file)
@@ -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)