[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/bgpd.c b/bgpd/bgpd.c
index 8eb0d2e..cebde0a 100644
--- a/bgpd/bgpd.c
+++ b/bgpd/bgpd.c
@@ -4512,13 +4512,13 @@
 	    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 @@
       /* 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 @@
 	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 @@
 	  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);
 	}