summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_debug.c
diff options
context:
space:
mode:
authorRuss White <russ@riw.us>2023-02-21 14:01:03 +0100
committerGitHub <noreply@github.com>2023-02-21 14:01:03 +0100
commitba755d35e508c2452e5459bdd7c0dd67a70a88a4 (patch)
treeadc08f46788b8012240faec23ae7e7271bb0d40d /bgpd/bgp_debug.c
parentMerge pull request #12849 from opensourcerouting/fix/tests_enum (diff)
parentbgpd: handle case where passed RD is null (diff)
downloadfrr-ba755d35e508c2452e5459bdd7c0dd67a70a88a4.tar.xz
frr-ba755d35e508c2452e5459bdd7c0dd67a70a88a4.zip
Merge pull request #12248 from pguibert6WIND/bgpasdot
lib, bgp: add initial support for asdot format
Diffstat (limited to 'bgpd/bgp_debug.c')
-rw-r--r--bgpd/bgp_debug.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/bgpd/bgp_debug.c b/bgpd/bgp_debug.c
index 2dec1ca46..782245e51 100644
--- a/bgpd/bgp_debug.c
+++ b/bgpd/bgp_debug.c
@@ -2635,6 +2635,7 @@ const char *bgp_debug_rdpfxpath2str(afi_t afi, safi_t safi,
char tag_buf[30];
char overlay_index_buf[INET6_ADDRSTRLEN + 14];
const struct prefix_evpn *evp;
+ int len = 0;
/* ' with addpath ID ' 17
* max strlen of uint32 + 10
@@ -2688,11 +2689,15 @@ const char *bgp_debug_rdpfxpath2str(afi_t afi, safi_t safi,
}
}
- if (prd)
- snprintfrr(str, size, "RD %pRD %pFX%s%s%s %s %s", prd, pu.p,
+ if (prd) {
+ len += snprintfrr(str + len, size - len, "RD ");
+ len += snprintfrr(str + len, size - len,
+ BGP_RD_AS_FORMAT(bgp_get_asnotation(NULL)),
+ prd);
+ snprintfrr(str + len, size - len, " %pFX%s%s%s %s %s", pu.p,
overlay_index_buf, tag_buf, pathid_buf, afi2str(afi),
safi2str(safi));
- else if (safi == SAFI_FLOWSPEC) {
+ } else if (safi == SAFI_FLOWSPEC) {
char return_string[BGP_FLOWSPEC_NLRI_STRING_MAX];
const struct prefix_fs *fs = pu.fs;