summaryrefslogtreecommitdiff
path: root/proto/bgp/attrs.c
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2022-09-07 13:54:20 +0200
committerMaria Matejka <mq@ucw.cz>2022-09-08 15:24:02 +0200
commitfb7fb6744582b2bb74b3b1e32696bd5534e93054 (patch)
treea5b6d0bf41556edc242bd5dbf8d0aaf96af66ae1 /proto/bgp/attrs.c
parenta42877b9bf09c4c042bced3910ade9b71ce3724c (diff)
Table access is now locked.
Diffstat (limited to 'proto/bgp/attrs.c')
-rw-r--r--proto/bgp/attrs.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/proto/bgp/attrs.c b/proto/bgp/attrs.c
index dcced164..bfdd9ac5 100644
--- a/proto/bgp/attrs.c
+++ b/proto/bgp/attrs.c
@@ -1981,9 +1981,20 @@ bgp_out_table_export_start(struct rt_exporter *re, struct rt_export_request *req
rt_init_export(re, req->hook);
}
+static void
+bgp_out_table_export_done(void *data)
+{
+ struct bgp_out_export_hook *hook = data;
+ struct rt_export_request *req = hook->h.req;
+ void (*stopped)(struct rt_export_request *) = hook->h.stopped;
+
+ rt_export_stopped(&hook->h);
+ CALL(stopped, req);
+}
+
static const struct rt_exporter_class bgp_out_table_export_class = {
.start = bgp_out_table_export_start,
- .done = rt_export_stopped,
+ .done = bgp_out_table_export_done,
};
void
@@ -2519,7 +2530,7 @@ use_deterministic_med(struct rte_storage *r)
}
int
-bgp_rte_recalculate(rtable *table, net *net, rte *new, rte *old, rte *old_best)
+bgp_rte_recalculate(struct rtable_private *table, net *net, rte *new, rte *old, rte *old_best)
{
rte *key = new ? new : old;
u32 lpref = rt_get_preference(key);