Skip to content

Commit

Permalink
Merge pull request #15520 from donaldsharp/bgp_dest_dev_build
Browse files Browse the repository at this point in the history
bgpd: When using dev build add pointer information to %pBD
  • Loading branch information
ton31337 authored Mar 18, 2024
2 parents 051f224 + 894cb4f commit 5e42011
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions bgpd/bgp_table.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,11 @@ static ssize_t printfrr_bd(struct fbuf *buf, struct printfrr_eargs *ea,
if (!dest)
return bputs(buf, "(null)");

#if !defined(DEV_BUILD)
/* need to get the real length even if buffer too small */
prefix2str(p, cbuf, sizeof(cbuf));
return bputs(buf, cbuf);
#else
return bprintfrr(buf, "%s(%p)", prefix2str(p, cbuf, sizeof(cbuf)), dest);
#endif
}
3 changes: 2 additions & 1 deletion doc/developer/logging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,8 @@ bgpd
.. frrfmt:: %pBD (struct bgp_dest *)
Print prefix for a BGP destination.
Print prefix for a BGP destination. When using ``--enable-dev-build`` include
the pointer value for the bgp_dest.
:frrfmtout:`fe80::1234/64`
Expand Down

0 comments on commit 5e42011

Please sign in to comment.