Skip to content

Commit

Permalink
Merge pull request #5640 from slankdev/slankdev-bgpd-fix-large-rd-frr…
Browse files Browse the repository at this point in the history
…-7-0

bgpd: [7.0] fix large route-distinguisher's format
  • Loading branch information
donaldsharp committed Jan 7, 2020
2 parents 7fbc0f6 + 1e0c6ae commit 1e504d4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions bgpd/bgp_rd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1e504d4

Please sign in to comment.