diff options
| author | Donatas Abraitis <donatas@opensourcerouting.org> | 2024-04-26 23:24:54 +0300 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-26 23:24:54 +0300 | 
| commit | d3c556652af80fabe99d110b572b597145aca5da (patch) | |
| tree | f5ef1c8a3a6c5dbc49aec0355c83f2f2602e7fa5 /bgpd/bgp_route.c | |
| parent | f19817f71daeb3b566ac55e5605c683dfcd70369 (diff) | |
| parent | 500227ae76367ad63b03dd9f6e4064d2067f545f (diff) | |
Merge pull request #15845 from pguibert6WIND/bmp_improvements
Bmp improvements about statistics
Diffstat (limited to 'bgpd/bgp_route.c')
| -rw-r--r-- | bgpd/bgp_route.c | 6 | 
1 files changed, 6 insertions, 0 deletions
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 6bf56a5285..5f6ef5ae07 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -487,6 +487,8 @@ void bgp_path_info_add_with_caller(const char *name, struct bgp_dest *dest,  	bgp_dest_lock_node(dest);  	peer_lock(pi->peer); /* bgp_path_info peer reference */  	bgp_dest_set_defer_flag(dest, false); +	if (pi->peer) +		pi->peer->stat_pfx_loc_rib++;  	hook_call(bgp_snmp_update_stats, dest, pi, true);  } @@ -507,6 +509,8 @@ struct bgp_dest *bgp_path_info_reap(struct bgp_dest *dest,  	pi->next = NULL;  	pi->prev = NULL; +	if (pi->peer) +		pi->peer->stat_pfx_loc_rib--;  	hook_call(bgp_snmp_update_stats, dest, pi, false);  	bgp_path_info_unlock(pi); @@ -521,6 +525,8 @@ static struct bgp_dest *bgp_path_info_reap_unsorted(struct bgp_dest *dest,  	pi->next = NULL;  	pi->prev = NULL; +	if (pi->peer) +		pi->peer->stat_pfx_loc_rib--;  	hook_call(bgp_snmp_update_stats, dest, pi, false);  	bgp_path_info_unlock(pi);  | 
