mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 15:33:56 +00:00
bgpd: update time of last change when label nexthop entry changed
A timer attribute is added for each label nexthop entry, in order to know when the last change occured. The timer value will be used for troubleshooting by a show command in the next commit. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
This commit is contained in:
parent
882d7b8179
commit
60e5bc23b9
@ -74,6 +74,8 @@ struct bgp_label_per_nexthop_cache {
|
|||||||
/* list of path_vrfs using it */
|
/* list of path_vrfs using it */
|
||||||
LIST_HEAD(path_lists, bgp_path_info) paths;
|
LIST_HEAD(path_lists, bgp_path_info) paths;
|
||||||
|
|
||||||
|
time_t last_update;
|
||||||
|
|
||||||
/* Back pointer to the cache tree this entry belongs to. */
|
/* Back pointer to the cache tree this entry belongs to. */
|
||||||
struct bgp_label_per_nexthop_cache_head *tree;
|
struct bgp_label_per_nexthop_cache_head *tree;
|
||||||
};
|
};
|
||||||
|
@ -1472,6 +1472,7 @@ static mpls_label_t _vpn_leak_from_vrf_get_per_nexthop_label(
|
|||||||
LIST_INSERT_HEAD(&(blnc->paths), pi, label_nh_thread);
|
LIST_INSERT_HEAD(&(blnc->paths), pi, label_nh_thread);
|
||||||
pi->label_nexthop_cache = blnc;
|
pi->label_nexthop_cache = blnc;
|
||||||
pi->label_nexthop_cache->path_count++;
|
pi->label_nexthop_cache->path_count++;
|
||||||
|
blnc->last_update = monotime(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* then add or update the selected nexthop */
|
/* then add or update the selected nexthop */
|
||||||
|
Loading…
Reference in New Issue
Block a user