mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-27 10:04:18 +00:00
Merge pull request #16984 from FRRouting/mergify/bp/stable/9.1/pr-16977
bgpd: fix printfrr_bp for non initialized peers (backport #16977)
This commit is contained in:
commit
a62d592c04
@ -8610,6 +8610,12 @@ static ssize_t printfrr_bp(struct fbuf *buf, struct printfrr_eargs *ea,
|
|||||||
if (!peer)
|
if (!peer)
|
||||||
return bputs(buf, "(null)");
|
return bputs(buf, "(null)");
|
||||||
|
|
||||||
|
if (!peer->host) {
|
||||||
|
if (peer->conf_if)
|
||||||
|
return bprintfrr(buf, "%s", peer->conf_if);
|
||||||
|
return bprintfrr(buf, "%pSU", &peer->connection->su);
|
||||||
|
}
|
||||||
|
|
||||||
return bprintfrr(buf, "%s(%s)", peer->host,
|
return bprintfrr(buf, "%s(%s)", peer->host,
|
||||||
peer->hostname ? peer->hostname : "Unknown");
|
peer->hostname ? peer->hostname : "Unknown");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user