From 84f04a6d0f41c5c1d3e87c0e29b7a8025f80892b Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Tue, 19 May 2015 18:29:17 -0700 Subject: [PATCH] bgpd: bgp-no-as-fix.patch bgp: Fix of peer group internal and external show run output When doing a show run for peer-groups in bgp, the remote-as was not being printed Signed-off-by: Donald Sharp Reviewed-by: --- bgpd/bgpd.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index 894b7c939b..14aa909cbb 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -5891,9 +5891,19 @@ bgp_config_write_peer (struct vty *vty, struct bgp *bgp, { if (! g_peer->as) { - if (g_peer->as_type == AS_SPECIFIED) - vty_out (vty, " neighbor %s remote-as %u%s", addr, peer->as, - VTY_NEWLINE); + if (peer->as_type == AS_SPECIFIED) + { + vty_out (vty, " neighbor %s remote-as %u%s", addr, peer->as, + VTY_NEWLINE); + } + else if (peer->as_type == AS_INTERNAL) + { + vty_out (vty, " neighbor %s remote-as internal%s", addr, VTY_NEWLINE); + } + else if (peer->as_type == AS_EXTERNAL) + { + vty_out (vty, " neighbor %s remote-as external%s", addr, VTY_NEWLINE); + } } if (peer->af_group[AFI_IP][SAFI_UNICAST]) vty_out (vty, " neighbor %s peer-group %s%s", addr, -- 2.39.5