diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2019-01-30 17:03:30 +0100 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2019-01-30 17:08:11 +0100 |
commit | b4438e40efa498325f38f0bf4681ecb2bbba4da7 (patch) | |
tree | 1603197eb894b6677b7006ec0969c77f9408a6d5 /nest | |
parent | ccb37330d062712935b3f3b9c236322d20c177f6 (diff) |
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.
Diffstat (limited to 'nest')
-rw-r--r-- | nest/rt-table.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/nest/rt-table.c b/nest/rt-table.c index cae6afaa..a06b8c35 100644 --- a/nest/rt-table.c +++ b/nest/rt-table.c @@ -434,7 +434,8 @@ rt_notify_basic(struct announce_hook *ah, net *net, rte *new0, rte *old0, int re if (new) new = export_filter(ah, new, &new_free, &tmpa, 0); - if (old && !(refeed || (old->lastmod <= ah->last_out_filter_change))) + if (old && !(refeed || ((old->lastmod <= ah->last_out_filter_change) && + (p != old->sender->proto)))) old = export_filter(ah, old, &old_free, NULL, 1); if (!new && !old) |