summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2020-01-07 13:56:16 -0500
committerGitHub <noreply@github.com>2020-01-07 13:56:16 -0500
commit1e504d4d2d621adc48b09a17b5f52662455553b1 (patch)
treea8c412b6cca31264bffca7875a1d381b69645646
parent7fbc0f6c1d7274df50e365ba8374d818c9d841a8 (diff)
parent1e0c6ae070b7c6d217c0aa2567ecbdfa5a42f0e6 (diff)
Merge pull request #5640 from slankdev/slankdev-bgpd-fix-large-rd-frr-7-0stable/7.0
bgpd: [7.0] fix large route-distinguisher's format
-rw-r--r--bgpd/bgp_rd.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/bgpd/bgp_rd.c b/bgpd/bgp_rd.c
index 77f5aade5f..5d285b2bd0 100644
--- a/bgpd/bgp_rd.c
+++ b/bgpd/bgp_rd.c
@@ -175,15 +175,16 @@ char *prefix_rd2str(struct prefix_rd *prd, char *buf, size_t size)
if (type == RD_TYPE_AS) {
decode_rd_as(pnt + 2, &rd_as);
- snprintf(buf, size, "%u:%d", rd_as.as, rd_as.val);
+ snprintf(buf, size, "%u:%" PRIu32, rd_as.as, rd_as.val);
return buf;
} else if (type == RD_TYPE_AS4) {
decode_rd_as4(pnt + 2, &rd_as);
- snprintf(buf, size, "%u:%d", rd_as.as, rd_as.val);
+ snprintf(buf, size, "%u:%" PRIu32, rd_as.as, rd_as.val);
return buf;
} else if (type == RD_TYPE_IP) {
decode_rd_ip(pnt + 2, &rd_ip);
- snprintf(buf, size, "%s:%d", inet_ntoa(rd_ip.ip), rd_ip.val);
+ snprintf(buf, size, "%s:%" PRIu16, inet_ntoa(rd_ip.ip),
+ rd_ip.val);
return buf;
}
#if ENABLE_BGP_VNC