]> git.puffer.fish Git - mirror/frr.git/commitdiff
Zebra: Fix replace route for uninstall scenario
authorvivek <vivek@cumulusnetworks.com>
Thu, 19 Nov 2015 20:48:02 +0000 (12:48 -0800)
committervivek <vivek@cumulusnetworks.com>
Thu, 19 Nov 2015 20:48:02 +0000 (12:48 -0800)
When a Quagga route that is currently installed is superceded by a
kernel route (connected or static route to same destination), the
Quagga route is not uninstalled from the kernel. Fix by ensuring
this case is handled correctly.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Ticket: CM-7152
Reviewed By: CCR-3476
Testing Done: Manual tests and verify failed test.

Fixes: Replace route implementation (IPv4 and IPv6)
zebra/zebra_rib.c

index 9eb28483c6845a4b95ee16441c23a7417bfbb48f..300c2143cb0877afa3f83a68fcc14725eaa78481 100644 (file)
@@ -1670,6 +1670,12 @@ rib_process (struct route_node *rn)
                 }
               rib_install_kernel (rn, select, fib? 1 : 0);
             }
+          else
+            {
+              /* Uninstall prior route here, if needed. */
+              if (fib && !RIB_SYSTEM_ROUTE (fib))
+                rib_uninstall_kernel (rn, fib);
+            }
 
          SET_FLAG (select->flags, ZEBRA_FLAG_SELECTED);
          /* Unconditionally announce, this part is exercised by new routes */