Skip to content

Commit

Permalink
Merge pull request FRRouting#16984 from FRRouting/mergify/bp/stable/9…
Browse files Browse the repository at this point in the history
….1/pr-16977

bgpd: fix printfrr_bp for non initialized peers (backport FRRouting#16977)
  • Loading branch information
ton31337 authored Oct 3, 2024
2 parents a3b1e32 + ba77ea1 commit a62d592
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions bgpd/bgpd.c
Original file line number Diff line number Diff line change
Expand Up @@ -8610,6 +8610,12 @@ static ssize_t printfrr_bp(struct fbuf *buf, struct printfrr_eargs *ea,
if (!peer)
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,
peer->hostname ? peer->hostname : "Unknown");
}
Expand Down

0 comments on commit a62d592

Please sign in to comment.