Merge pull request #3704 from donaldsharp/route_replace

zebra: On route update context is sometimes indeterminate in post-processing
This commit is contained in:
Mark Stapp 2019-01-30 17:09:52 +01:00 committed by GitHub
commit b8a84b5cc1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1933,7 +1933,16 @@ static void rib_process_result(struct zebra_dplane_ctx *ctx)
UNSET_FLAG(re->status, ROUTE_ENTRY_FAILED);
SET_FLAG(re->status, ROUTE_ENTRY_INSTALLED);
}
if (old_re) {
/*
* On an update operation from the same route type
* context retrieval currently has no way to know
* which was the old and which was the new.
* So don't unset our flags that we just set.
* We know redistribution is ok because the
* old_re in this case is used for nothing
* more than knowing whom to contact if necessary.
*/
if (old_re && old_re != re) {
UNSET_FLAG(old_re->status, ROUTE_ENTRY_FAILED);
UNSET_FLAG(old_re->status,
ROUTE_ENTRY_INSTALLED);