summaryrefslogtreecommitdiff
path: root/nest/proto.c
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2018-07-03 17:52:51 +0200
committerOndrej Zajicek (work) <santiago@crfreenet.org>2018-07-03 18:00:52 +0200
commita81e18da254ddd7cccff82feab61aa943a277805 (patch)
tree4e30d3e26b9eeb3385179afd2aab252e29c4ab5b /nest/proto.c
parent8e86ffce8251f4e48f61b6d8e89966d037ef8e59 (diff)
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.
Diffstat (limited to 'nest/proto.c')
-rw-r--r--nest/proto.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/nest/proto.c b/nest/proto.c
index 49f71304..8a8221a8 100644
--- a/nest/proto.c
+++ b/nest/proto.c
@@ -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;