summaryrefslogtreecommitdiff
path: root/nest/rt-table.c
diff options
context:
space:
mode:
authorPawel Maslanka <pmaslank@akamai.com>2021-03-29 22:45:21 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2023-04-16 20:05:15 +0200
commita848dad40aa618e5e24417e4ef46b62c860de679 (patch)
treef14426246ec7f6ef89b0c12460f4979f6b2a047e /nest/rt-table.c
parent9e44ace3928a19560058dc713fcbff3a8bad3b3c (diff)
BMP protocol support
Initial implementation of a basic subset of the BMP (BGP Monitoring Protocol, RFC 7854) from Akamai team. Submitted for further review and improvement.
Diffstat (limited to 'nest/rt-table.c')
-rw-r--r--nest/rt-table.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/nest/rt-table.c b/nest/rt-table.c
index e4b27814..553e8223 100644
--- a/nest/rt-table.c
+++ b/nest/rt-table.c
@@ -3095,6 +3095,10 @@ rte_update_in(struct channel *c, const net_addr *n, rte *new, struct rte_src *sr
if (old->flags & (REF_STALE | REF_DISCARD | REF_MODIFY))
{
old->flags &= ~(REF_STALE | REF_DISCARD | REF_MODIFY);
+
+ if (c->proto->rte_update_in_notify)
+ c->proto->rte_update_in_notify(c->proto, c, net, new, old, src);
+
return 1;
}
@@ -3118,6 +3122,9 @@ rte_update_in(struct channel *c, const net_addr *n, rte *new, struct rte_src *sr
if (!old)
goto drop_withdraw;
+ if (c->proto->rte_update_in_notify)
+ c->proto->rte_update_in_notify(c->proto, c, net, new, old, src);
+
if (!net->routes)
fib_delete(&tab->fib, net);
@@ -3149,6 +3156,10 @@ rte_update_in(struct channel *c, const net_addr *n, rte *new, struct rte_src *sr
e->next = *pos;
*pos = e;
tab->rt_count++;
+
+ if (c->proto->rte_update_in_notify)
+ c->proto->rte_update_in_notify(c->proto, c, net, new, old, src);
+
return 1;
drop_update: