mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-03 11:01:48 +00:00
bgpd: Initialise timebuf arrays to zeros for dampening reuse timer
Avoid having something like this in outputs: Before: ``` munet> r1 shi vtysh -c 'show bgp dampening damp' BGP table version is 10, local router ID is 10.10.10.1, vrf id 0 Default local pref 100, local AS 65001 Status codes: s suppressed, d damped, h history, * valid, > best, = multipath, i internal, r RIB-failure, S Stale, R Removed Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self Origin codes: i - IGP, e - EGP, ? - incomplete RPKI validation codes: V valid, I invalid, N Not found Network From Reuse Path *d 2001:db8:1::1/128 2001:db8::2 (null) 65002 ? *d 2001:db8:2::1/128 2001:db8::2 (null) 65002 ? *d 2001:db8:3::1/128 2001:db8::2 (null) 65002 ? *d 2001:db8:4::1/128 2001:db8::2 (null) 65002 ? *d 2001:db8:5::1/128 2001:db8::2 (null) 65002 ? Displayed 5 routes and 5 total paths munet> r1 shi vtysh -c 'show bgp dampening flap' BGP table version is 10, local router ID is 10.10.10.1, vrf id 0 Default local pref 100, local AS 65001 Status codes: s suppressed, d damped, h history, * valid, > best, = multipath, i internal, r RIB-failure, S Stale, R Removed Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self Origin codes: i - IGP, e - EGP, ? - incomplete RPKI validation codes: V valid, I invalid, N Not found Network From Flaps Duration Reuse Path *d 2001:db8:1::1/128 2001:db8::2 2 00:03:10 (null) 65002 ? *d 2001:db8:2::1/128 2001:db8::2 2 00:03:10 (null) 65002 ? *d 2001:db8:3::1/128 2001:db8::2 2 00:03:10 (null) 65002 ? *d 2001:db8:4::1/128 2001:db8::2 2 00:03:10 (null) 65002 ? *d 2001:db8:5::1/128 2001:db8::2 2 00:03:10 (null) 65002 ? Displayed 5 routes and 5 total paths ``` After: ``` munet> r1 shi vtysh -c 'show bgp dampening damp ' BGP table version is 10, local router ID is 10.10.10.1, vrf id 0 Default local pref 100, local AS 65001 Status codes: s suppressed, d damped, h history, * valid, > best, = multipath, i internal, r RIB-failure, S Stale, R Removed Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self Origin codes: i - IGP, e - EGP, ? - incomplete RPKI validation codes: V valid, I invalid, N Not found Network From Reuse Path *d 2001:db8:1::1/128 2001:db8::2 00:00:00 65002 ? *d 2001:db8:2::1/128 2001:db8::2 00:00:00 65002 ? *d 2001:db8:3::1/128 2001:db8::2 00:00:00 65002 ? *d 2001:db8:4::1/128 2001:db8::2 00:00:00 65002 ? *d 2001:db8:5::1/128 2001:db8::2 00:00:00 65002 ? Displayed 5 routes and 5 total paths munet> r1 shi vtysh -c 'show bgp dampening flap' BGP table version is 10, local router ID is 10.10.10.1, vrf id 0 Default local pref 100, local AS 65001 Status codes: s suppressed, d damped, h history, * valid, > best, = multipath, i internal, r RIB-failure, S Stale, R Removed Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self Origin codes: i - IGP, e - EGP, ? - incomplete RPKI validation codes: V valid, I invalid, N Not found Network From Flaps Duration Reuse Path *d 2001:db8:1::1/128 2001:db8::2 2 00:00:15 00:00:00 65002 ? *d 2001:db8:2::1/128 2001:db8::2 2 00:00:15 00:00:00 65002 ? *d 2001:db8:3::1/128 2001:db8::2 2 00:00:15 00:00:00 65002 ? *d 2001:db8:4::1/128 2001:db8::2 2 00:00:15 00:00:00 65002 ? *d 2001:db8:5::1/128 2001:db8::2 2 00:00:15 00:00:00 65002 ? Displayed 5 routes and 5 total paths ``` Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
This commit is contained in:
parent
14d8590688
commit
c39506d80f
@ -558,7 +558,7 @@ void bgp_damp_info_vty(struct vty *vty, struct bgp_path_info *path, afi_t afi,
|
||||
{
|
||||
struct bgp_damp_info *bdi;
|
||||
time_t t_now, t_diff;
|
||||
char timebuf[BGP_UPTIME_LEN];
|
||||
char timebuf[BGP_UPTIME_LEN] = {};
|
||||
int penalty;
|
||||
struct bgp_damp_config *bdc = &damp[afi][safi];
|
||||
|
||||
|
@ -9824,7 +9824,7 @@ static void damp_route_vty_out(struct vty *vty, const struct prefix *p,
|
||||
{
|
||||
struct attr *attr = path->attr;
|
||||
int len;
|
||||
char timebuf[BGP_UPTIME_LEN];
|
||||
char timebuf[BGP_UPTIME_LEN] = {};
|
||||
json_object *json_path = NULL;
|
||||
|
||||
if (use_json)
|
||||
@ -9883,7 +9883,7 @@ static void flap_route_vty_out(struct vty *vty, const struct prefix *p,
|
||||
{
|
||||
struct attr *attr = path->attr;
|
||||
struct bgp_damp_info *bdi;
|
||||
char timebuf[BGP_UPTIME_LEN];
|
||||
char timebuf[BGP_UPTIME_LEN] = {};
|
||||
int len;
|
||||
json_object *json_path = NULL;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user