[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.
diff --git a/bgpd/bgp_ecommunity.c b/bgpd/bgp_ecommunity.c
index c08673c..27c3cd6 100644
--- a/bgpd/bgp_ecommunity.c
+++ b/bgpd/bgp_ecommunity.c
@@ -673,7 +673,7 @@
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 @@
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;