From: vivek Date: Sun, 15 Nov 2015 15:36:50 +0000 (-0800) Subject: Zebra: Ensure correct route is used for redistribute delete. X-Git-Tag: frr-2.0-rc1~1199^2~5 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=a219b2952ae2f3b47d674d47f48e53c6c1e4bc70;p=mirror%2Ffrr.git Zebra: Ensure correct route is used for redistribute delete. After the optimization introduced by patch zebra-redist-update-fix.patch which implements "replace" semantics for redistributed routes instead of a delete followed by add, the code was passing an incorrect route for redistribute deletion in one case. This is mainly inconsequential as of now as the deletion process primarily cares about only the destination, but the code needs to be corrected and that is done here. Signed-off-by: Vivek Venkatraman Reviewed-by: Donald Sharp Fixes: zebra-redist-update-fix.patch Ticket: CM-8112 Reviewed By: CCR-3760 Testing Done: Trivial Note: 1. Needs changes after IPv6 route replace patches are included. 2. Imported from 2.5-br patch zebra-redist-delete-fix.patch --- diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index 78c6c831b5..481c9e0d33 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -1702,8 +1702,9 @@ rib_process (struct route_node *rn) assert (fib); rib_uninstall_kernel (rn, fib); } - /* if "select", the earlier redist delete wouldn't have happened */ - redistribute_delete(&rn->p, select); + /* if "select", the earlier redist delete wouldn't have happened */ + if (fib) + redistribute_delete(&rn->p, fib); } UNSET_FLAG(select->flags, ZEBRA_FLAG_CHANGED); }