summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_ecommunity.c
diff options
context:
space:
mode:
authorDenis Ovsienko <pilot@etcnet.org>2009-04-30 15:16:22 +0200
committerDenis Ovsienko <pilot@etcnet.org>2009-04-30 15:16:22 +0200
commitaea339f72807c34a7916d8614e030069815e144c (patch)
tree7b0ab93dcfec82736f05ac39106096360e4ceeb5 /bgpd/bgp_ecommunity.c
parentDmitry Tejblum <tejblum@yandex-team.ru> (diff)
downloadfrr-aea339f72807c34a7916d8614e030069815e144c.tar.xz
frr-aea339f72807c34a7916d8614e030069815e144c.zip
[bgpd] AS4 bugfix by Chris Caputo <ccaputo@alt.net>
* bgpd/bgp_aspath.c: (aspath_make_str_count) "assert (len < str_size)" was getting hit under certain 4-byte ASN conditions. New realloc strategy. * bgpd/bgp_aspath.c: (aspath_key_make) const warning fix. "%d" -> "%u" 4-byte ASN corrections. Prevent negative number when ASN is above 2^31.
Diffstat (limited to 'bgpd/bgp_ecommunity.c')
-rw-r--r--bgpd/bgp_ecommunity.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bgpd/bgp_ecommunity.c b/bgpd/bgp_ecommunity.c
index c08673ceb..27c3cd693 100644
--- a/bgpd/bgp_ecommunity.c
+++ b/bgpd/bgp_ecommunity.c
@@ -673,7 +673,7 @@ ecommunity_ecom2str (struct ecommunity *ecom, int format)
eas.val = (*pnt++ << 8);
eas.val |= (*pnt++);
- len = sprintf( str_buf + str_pnt, "%s%d:%d", prefix,
+ len = sprintf( str_buf + str_pnt, "%s%u:%d", prefix,
eas.as, eas.val );
str_pnt += len;
first = 0;
@@ -688,7 +688,7 @@ ecommunity_ecom2str (struct ecommunity *ecom, int format)
eas.val |= (*pnt++ << 8);
eas.val |= (*pnt++);
- len = sprintf (str_buf + str_pnt, "%s%d:%d", prefix,
+ len = sprintf (str_buf + str_pnt, "%s%u:%d", prefix,
eas.as, eas.val);
str_pnt += len;
first = 0;