summaryrefslogtreecommitdiff
path: root/proto/bgp
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2023-03-31 10:46:17 +0200
committerMaria Matejka <mq@ucw.cz>2023-04-04 17:00:58 +0200
commit0b7657a9dc449fc19f6c06a99e9b86ffad37570e (patch)
tree1c9dbd3453e0dd7bf8c620530102eca58d007de8 /proto/bgp
parent98f69aa4190d31f749ac4999cab9700850da15a9 (diff)
Route feed marks only the relevant pending exports as done
Diffstat (limited to 'proto/bgp')
-rw-r--r--proto/bgp/attrs.c8
-rw-r--r--proto/bgp/bgp.h2
2 files changed, 7 insertions, 3 deletions
diff --git a/proto/bgp/attrs.c b/proto/bgp/attrs.c
index f6097078..2f72719f 100644
--- a/proto/bgp/attrs.c
+++ b/proto/bgp/attrs.c
@@ -1959,7 +1959,7 @@ bgp_out_table_feed(void *data)
if (hook->h.req->export_bulk)
{
const rte *feed = &es.rte;
- hook->h.req->export_bulk(hook->h.req, n->net, &rpe, &feed, 1);
+ hook->h.req->export_bulk(hook->h.req, n->net, &rpe, &rpe, &feed, 1);
}
else if (hook->h.req->export_one)
hook->h.req->export_one(hook->h.req, n->net, &rpe);
@@ -2657,7 +2657,9 @@ bgp_rte_recalculate(struct rtable_private *table, net *net, rte *new, rte *old,
}
void
-bgp_rte_modify_stale(struct rt_export_request *req, const net_addr *n, struct rt_pending_export *rpe UNUSED, const rte **feed, uint count)
+bgp_rte_modify_stale(struct rt_export_request *req, const net_addr *n,
+ struct rt_pending_export *first, struct rt_pending_export *last,
+ const rte **feed, uint count)
{
struct bgp_channel *c = SKIP_BACK(struct bgp_channel, stale_feed, req);
struct rt_import_hook *irh = c->c.in_req.hook;
@@ -2705,6 +2707,8 @@ bgp_rte_modify_stale(struct rt_export_request *req, const net_addr *n, struct rt
/* Restore the memory state */
lp_restore(tmp_linpool, &tmpp);
}
+
+ rpe_mark_seen_all(req->hook, first, last, NULL);
}
diff --git a/proto/bgp/bgp.h b/proto/bgp/bgp.h
index 1a55fef6..b9c1192c 100644
--- a/proto/bgp/bgp.h
+++ b/proto/bgp/bgp.h
@@ -618,7 +618,7 @@ void bgp_done_prefix(struct bgp_channel *c, struct bgp_prefix *px, struct bgp_bu
int bgp_rte_better(const rte *, const rte *);
int bgp_rte_mergable(const rte *pri, const rte *sec);
int bgp_rte_recalculate(struct rtable_private *table, net *net, rte *new, rte *old, rte *old_best);
-void bgp_rte_modify_stale(struct rt_export_request *req, const net_addr *n, struct rt_pending_export *rpe UNUSED, const rte **feed, uint count);
+void bgp_rte_modify_stale(struct rt_export_request *req, const net_addr *n, struct rt_pending_export *first, struct rt_pending_export *last, const rte **feed, uint count);
u32 bgp_rte_igp_metric(const rte *);
void bgp_rt_notify(struct proto *P, struct channel *C, const net_addr *n, rte *new, const rte *old);
int bgp_preexport(struct channel *, struct rte *);