summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_vty.c
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas@opensourcerouting.org>2024-09-05 14:48:14 +0200
committerDonatas Abraitis <donatas@opensourcerouting.org>2024-09-05 14:48:14 +0200
commit9de74cf0beff75dace53881e11ba40c0d707b8a1 (patch)
tree604e760c9a7e6808228ed74ac2c2043eb5b5105b /bgpd/bgp_vty.c
parentbgpd: Allow using `solo` for peer-groups (diff)
downloadfrr-9de74cf0beff75dace53881e11ba40c0d707b8a1.tar.xz
frr-9de74cf0beff75dace53881e11ba40c0d707b8a1.zip
bgpd: Show what is the real type of the peer-group
``` ton# sh ip bgp peer-group BGP peer-group pg-a Peer-group type is auto Configured address-families: IPv4 Unicast; BGP peer-group pg-e, remote AS 0 Peer-group type is external Configured address-families: IPv4 Unicast; BGP peer-group pg-i, remote AS 65001 Peer-group type is internal Configured address-families: IPv4 Unicast; ton# ``` `auto` should be handled accordingly. Fixes: 0dfe25697f5299326046fcfb66f2c6beca7c423c ("bgpd: Implement neighbor X remote-as auto") Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Diffstat (limited to 'bgpd/bgp_vty.c')
-rw-r--r--bgpd/bgp_vty.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c
index 338f6e3a5..2766efc83 100644
--- a/bgpd/bgp_vty.c
+++ b/bgpd/bgp_vty.c
@@ -17072,8 +17072,13 @@ static int bgp_show_one_peer_group(struct vty *vty, struct peer_group *group,
vty_out(vty, "\nBGP peer-group %s\n", group->name);
}
- if ((group->bgp->as == conf->as) ||
- CHECK_FLAG(conf->as_type, AS_INTERNAL)) {
+ if (CHECK_FLAG(conf->as_type, AS_AUTO)) {
+ if (json)
+ json_object_string_add(json_peer_group, "type", "auto");
+ else
+ vty_out(vty, " Peer-group type is auto\n");
+ } else if ((group->bgp->as == conf->as) ||
+ CHECK_FLAG(conf->as_type, AS_INTERNAL)) {
if (json)
json_object_string_add(json_peer_group, "type",
"internal");