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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user