summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_route.c
diff options
context:
space:
mode:
authorPat Ruddy <pat@voltanet.io>2020-10-02 13:45:08 +0200
committerPat Ruddy <pat@voltanet.io>2021-02-02 10:37:10 +0100
commit7fd28dd245be1db24283e98bcf0a97d3384bb676 (patch)
tree1bb8e49488f9823b8159889f348a0fa563f17907 /bgpd/bgp_route.c
parentbgpd: add SNMP mplsL3vpnIfConfTable support (diff)
downloadfrr-7fd28dd245be1db24283e98bcf0a97d3384bb676.tar.xz
frr-7fd28dd245be1db24283e98bcf0a97d3384bb676.zip
bgpd: add mplsL3VpnVrfPerfTable support
support for counts of per-vrf routes: added deleted current Signed-off-by: Pat Ruddy <pat@voltanet.io>
Diffstat (limited to 'bgpd/bgp_route.c')
-rw-r--r--bgpd/bgp_route.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
index 0ac9a42dc..ce0323b64 100644
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -93,6 +93,10 @@
#include "bgpd/bgp_route_clippy.c"
#endif
+DEFINE_HOOK(bgp_snmp_update_stats,
+ (struct bgp_node *rn, struct bgp_path_info *pi, bool added),
+ (rn, pi, added))
+
/* Extern from bgp_dump.c */
extern const char *bgp_origin_str[];
extern const char *bgp_origin_long_str[];
@@ -402,6 +406,7 @@ void bgp_path_info_add(struct bgp_dest *dest, struct bgp_path_info *pi)
bgp_dest_lock_node(dest);
peer_lock(pi->peer); /* bgp_path_info peer reference */
bgp_dest_set_defer_flag(dest, false);
+ hook_call(bgp_snmp_update_stats, dest, pi, true);
}
/* Do the actual removal of info from RIB, for use by bgp_process
@@ -417,6 +422,7 @@ void bgp_path_info_reap(struct bgp_dest *dest, struct bgp_path_info *pi)
bgp_path_info_mpath_dequeue(pi);
bgp_path_info_unlock(pi);
+ hook_call(bgp_snmp_update_stats, dest, pi, false);
bgp_dest_unlock_node(dest);
}