mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-04-29 14:33:09 +00:00
bgpd: debug trace retrieve real peer origin of path info
The BGP path info debugging information should dump the real peer information for imported prefixes. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
This commit is contained in:
parent
8cd3d07097
commit
b1ff5529c7
@ -515,11 +515,19 @@ static uint32_t bgp_med_value(struct attr *attr, struct bgp *bgp)
|
||||
void bgp_path_info_path_with_addpath_rx_str(struct bgp_path_info *pi, char *buf,
|
||||
size_t buf_len)
|
||||
{
|
||||
if (pi->addpath_rx_id)
|
||||
snprintf(buf, buf_len, "path %s (addpath rxid %d)",
|
||||
pi->peer->host, pi->addpath_rx_id);
|
||||
struct peer *peer;
|
||||
|
||||
if (pi->sub_type == BGP_ROUTE_IMPORTED &&
|
||||
bgp_get_imported_bpi_ultimate(pi))
|
||||
peer = bgp_get_imported_bpi_ultimate(pi)->peer;
|
||||
else
|
||||
snprintf(buf, buf_len, "path %s", pi->peer->host);
|
||||
peer = pi->peer;
|
||||
|
||||
if (pi->addpath_rx_id)
|
||||
snprintf(buf, buf_len, "path %s (addpath rxid %d)", peer->host,
|
||||
pi->addpath_rx_id);
|
||||
else
|
||||
snprintf(buf, buf_len, "path %s", peer->host);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user