mirror of
https://git.proxmox.com/git/mirror_frr
synced 2026-01-26 22:09:35 +00:00
Fix unprotected debugs to warns and fix
In the case of a route replace failing we saw two issues with the logging: 1) The route replace was a debug instead of a warn -> In this case change code to zlog_warn 2) The buf in the route replace was not being initialized because buf initialization was protected by a debug check. -> In this case move the buf initialization to inside the failure case. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com> Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com> Reviewed-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
This commit is contained in:
parent
778cb26fbd
commit
fb02523bf3
@ -1307,8 +1307,9 @@ rib_process_add_route (struct zebra_vrf *zvrf, struct route_node *rn,
|
||||
if (rib_install_kernel (rn, select, 0))
|
||||
{
|
||||
installed = 0;
|
||||
zlog_debug ("%u:%s/%d: Route install failed",
|
||||
zvrf->vrf_id, buf, rn->p.prefixlen);
|
||||
inet_ntop (rn->p.family, &rn->p.u.prefix, buf, INET6_ADDRSTRLEN);
|
||||
zlog_warn ("%u:%s/%d: Route install failed",
|
||||
zvrf->vrf_id, buf, rn->p.prefixlen);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1393,8 +1394,9 @@ rib_process_update_route (struct zebra_vrf *zvrf, struct route_node *rn,
|
||||
if (rib_install_kernel (rn, select, 1))
|
||||
{
|
||||
installed = 0;
|
||||
zlog_debug ("%u:%s/%d: Route install failed",
|
||||
zvrf->vrf_id, buf, rn->p.prefixlen);
|
||||
inet_ntop (rn->p.family, &rn->p.u.prefix, buf, INET6_ADDRSTRLEN);
|
||||
zlog_warn ("%u:%s/%d: Route install failed",
|
||||
zvrf->vrf_id, buf, rn->p.prefixlen);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user