summaryrefslogtreecommitdiff
path: root/lib/prefix.c
diff options
context:
space:
mode:
authorLouis Scalbert <louis.scalbert@6wind.com>2023-04-21 11:56:07 +0200
committerLouis Scalbert <louis.scalbert@6wind.com>2023-09-18 14:57:03 +0200
commitbdb3fa3b9216aede64c5b982011fb04ef25c67f7 (patch)
tree57ca5e4069208043238c4fa518a23bd2e32630d2 /lib/prefix.c
parent0c94fb9cc853b3bcc98e8acca9fd03a036d33c92 (diff)
bgpd, lib: extend the size of the prefix string buffer
BGP Link-State prefixes are special prefixes that contains a lot of data. Extend the length of the prefix string buffer in order to display properly this type of prefixes with the next commits. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Diffstat (limited to 'lib/prefix.c')
-rw-r--r--lib/prefix.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/prefix.c b/lib/prefix.c
index 59acc7c22e..35bc3b3b6f 100644
--- a/lib/prefix.c
+++ b/lib/prefix.c
@@ -1166,7 +1166,7 @@ const char *bgp_linkstate_nlri_type_2str(uint16_t nlri_type)
const char *prefix2str(union prefixconstptr pu, char *str, int size)
{
const struct prefix *p = pu.p;
- char buf[PREFIX2STR_BUFFER];
+ char buf[PREFIX_STRLEN_EXTENDED];
int byte, tmp, a, b;
bool z = false;
size_t l;
@@ -1234,7 +1234,7 @@ const char *prefix2str(union prefixconstptr pu, char *str, int size)
static ssize_t prefixhost2str(struct fbuf *fbuf, union prefixconstptr pu)
{
const struct prefix *p = pu.p;
- char buf[PREFIX2STR_BUFFER];
+ char buf[PREFIX_STRLEN_EXTENDED];
switch (p->family) {
case AF_INET:
@@ -1752,7 +1752,7 @@ static ssize_t printfrr_pfx(struct fbuf *buf, struct printfrr_eargs *ea,
if (host_only)
return prefixhost2str(buf, (struct prefix *)ptr);
else {
- char cbuf[PREFIX_STRLEN];
+ char cbuf[PREFIX_STRLEN_EXTENDED];
prefix2str(ptr, cbuf, sizeof(cbuf));
return bputs(buf, cbuf);