]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: Install connected routes during VRF change only if interface is up 1661/head
authorvivek <vivek@cumulusnetworks.com>
Sat, 20 Jan 2018 21:21:05 +0000 (13:21 -0800)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Sun, 21 Jan 2018 14:34:15 +0000 (09:34 -0500)
During VRF change handling, the connected route for the interface should be
installed only if the interface is up. Otherwise, we end up with duplicate
connected routes which can lead to other problems.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
Ticket: CM-19364
Reviewed By: CCR-7099
Testing Done: Manual verification

zebra/interface.c

index 906f79613688302810c60ee0182fc4729a26e894..07570e64bfc2c32f5d045aee3396cd587fdd8a43 100644 (file)
@@ -768,7 +768,8 @@ void if_handle_vrf_change(struct interface *ifp, vrf_id_t vrf_id)
        zebra_interface_vrf_update_add(ifp, old_vrf_id);
 
        /* Install connected routes (in new VRF). */
-       if_install_connected(ifp);
+       if (if_is_operative(ifp))
+               if_install_connected(ifp);
 
        static_ifindex_update(ifp, true);