From e84c81b76ff6af88041b55c4ed25c208f78d4826 Mon Sep 17 00:00:00 2001 From: "Ondrej Zajicek (work)" Date: Wed, 30 Jan 2019 17:25:21 +0100 Subject: [PATCH] Nest: Prevent withdraws from propagation back to source protocol The earlier fix loosen conditions for not running filters on old route when deciding about route propagation to a protocol to avoid issues with ghost routes in some race conditions. Unfortunately, the fix also caused back-propagation of withdraws. For regular updates, back-propagation is prevented in import_control hooks, but these are not called on withdraws. For them, import_control hooks are called on old routes instead, changing (old, NULL) notification to (NULL, NULL), which is ignored. By not calling export processing in some cases, the withdraw is not ignored and is back-propagated. This patch fixes that by contract conditions so the earlier fix is not applied to back-propagated updates. --- nest/rt-table.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nest/rt-table.c b/nest/rt-table.c index ae4bb74d1..9952d91ad 100644 --- a/nest/rt-table.c +++ b/nest/rt-table.c @@ -571,7 +571,8 @@ rt_notify_basic(struct channel *c, net *net, rte *new0, rte *old0, int refeed) if (new) new = export_filter(c, new, &new_free, 0); - if (old && !(refeed || (old->lastmod <= c->last_tx_filter_change))) + if (old && !(refeed || ((old->lastmod <= c->last_tx_filter_change) && + (p != old->sender->proto)))) old = export_filter(c, old, &old_free, 1); if (!new && !old) -- 2.39.2