1
0
mirror of https://gitlab.labs.nic.cz/labs/bird.git synced 2024-05-11 16:54:54 +00:00

Nest: Fix race condition during reconfiguration

If export filter is changed during reconfiguration and a route disappears
between reconfiguration and refeed (e.g., if the route is a static route
also removed during the reconfiguration), the route is not withdrawn.
The patch fixes that by adding tx reconfiguration timestamp.
This commit is contained in:
Ondrej Zajicek (work)
2018-07-03 17:52:51 +02:00
parent 8e86ffce82
commit a81e18da25
3 changed files with 20 additions and 15 deletions

View File

@@ -165,6 +165,7 @@ proto_add_channel(struct proto *p, struct channel_config *cf)
c->channel_state = CS_DOWN;
c->export_state = ES_DOWN;
c->last_state_change = current_time();
c->last_tx_filter_change = current_time();
c->reloadable = 1;
CALL(c->channel->init, c, cf);
@@ -557,6 +558,9 @@ channel_reconfigure(struct channel *c, struct channel_config *cf)
channel_verify_limits(c);
if (export_changed)
c->last_tx_filter_change = current_time();
/* Execute channel-specific reconfigure hook */
if (c->channel->reconfigure && !c->channel->reconfigure(c, cf))
return 0;