]> git.proxmox.com Git - mirror_frr.git/commitdiff
zebra: re-install static routes needed vrf when the vrf intf comes up
authorDon Slice <dslice@cumulusnetworks.com>
Mon, 18 Jun 2018 11:38:45 +0000 (11:38 +0000)
committerDon Slice <dslice@cumulusnetworks.com>
Mon, 18 Jun 2018 11:38:45 +0000 (11:38 +0000)
Problem reported that if the vrf device is taken down and then brought
back up, any static route referencing that vrf device was not
re-installed.  This fix runs back thru the static routes that
reference the vrf device coming up and re-install them.

Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
zebra/interface.c

index 7de18d683c1b2d4574f045bb989ec15094fb1a4f..6125ff9a16b37b769c6a7a3ba44127c530c65ff8 100644 (file)
@@ -934,6 +934,12 @@ void if_up(struct interface *ifp)
        /* Install connected routes to the kernel. */
        if_install_connected(ifp);
 
+       /* Install any static routes using this vrf interface */
+       if (IS_ZEBRA_IF_VRF(ifp)) {
+               static_fixup_vrf_ids(zvrf);
+               static_config_install_delayed_routes(zvrf);
+       }
+
        if (IS_ZEBRA_DEBUG_RIB_DETAILED)
                zlog_debug("%u: IF %s up, scheduling RIB processing",
                           ifp->vrf_id, ifp->name);