summaryrefslogtreecommitdiff
path: root/bgpd/bgpd.c
diff options
context:
space:
mode:
authorDenis Ovsienko <pilot@etcnet.org>2009-04-30 17:16:22 +0400
committerDenis Ovsienko <pilot@etcnet.org>2009-04-30 17:16:22 +0400
commitaea339f72807c34a7916d8614e030069815e144c (patch)
tree7b0ab93dcfec82736f05ac39106096360e4ceeb5 /bgpd/bgpd.c
parentc540835eaf0cb59921969537d8e94cc83bb717f5 (diff)
[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/bgpd.c')
-rw-r--r--bgpd/bgpd.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c
index 8eb0d2e4..cebde0a4 100644
--- a/bgpd/bgpd.c
+++ b/bgpd/bgpd.c
@@ -4512,13 +4512,13 @@ bgp_config_write_peer (struct vty *vty, struct bgp *bgp,
vty_out (vty, " neighbor %s peer-group%s", addr,
VTY_NEWLINE);
if (peer->as)
- vty_out (vty, " neighbor %s remote-as %d%s", addr, peer->as,
+ vty_out (vty, " neighbor %s remote-as %u%s", addr, peer->as,
VTY_NEWLINE);
}
else
{
if (! g_peer->as)
- vty_out (vty, " neighbor %s remote-as %d%s", addr, peer->as,
+ vty_out (vty, " neighbor %s remote-as %u%s", addr, peer->as,
VTY_NEWLINE);
if (peer->af_group[AFI_IP][SAFI_UNICAST])
vty_out (vty, " neighbor %s peer-group %s%s", addr,
@@ -4528,7 +4528,7 @@ bgp_config_write_peer (struct vty *vty, struct bgp *bgp,
/* local-as. */
if (peer->change_local_as)
if (! peer_group_active (peer))
- vty_out (vty, " neighbor %s local-as %d%s%s", addr,
+ vty_out (vty, " neighbor %s local-as %u%s%s", addr,
peer->change_local_as,
CHECK_FLAG (peer->flags, PEER_FLAG_LOCAL_AS_NO_PREPEND) ?
" no-prepend" : "", VTY_NEWLINE);
@@ -4917,7 +4917,7 @@ bgp_config_write (struct vty *vty)
vty_out (vty, "!%s", VTY_NEWLINE);
/* Router bgp ASN */
- vty_out (vty, "router bgp %d", bgp->as);
+ vty_out (vty, "router bgp %u", bgp->as);
if (bgp_option_check (BGP_OPT_MULTIPLE_INSTANCE))
{
@@ -4978,7 +4978,7 @@ bgp_config_write (struct vty *vty)
vty_out (vty, " bgp confederation peers");
for (i = 0; i < bgp->confed_peers_cnt; i++)
- vty_out(vty, " %d", bgp->confed_peers[i]);
+ vty_out(vty, " %u", bgp->confed_peers[i]);
vty_out (vty, "%s", VTY_NEWLINE);
}