summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_vty.c
diff options
context:
space:
mode:
authorDonald Sharp <donaldsharp72@gmail.com>2024-09-05 23:42:20 +0200
committerGitHub <noreply@github.com>2024-09-05 23:42:20 +0200
commit340d51fc3a9c88b4db38c685cf87ab9970db060a (patch)
treed1e55919526744698b29510b7152e4708cc2e6d5 /bgpd/bgp_vty.c
parentMerge pull request #16752 from opensourcerouting/skip_scale_on_32bit (diff)
parenttests: Check if we can use `solo` with a peer-group (diff)
downloadfrr-340d51fc3a9c88b4db38c685cf87ab9970db060a.tar.xz
frr-340d51fc3a9c88b4db38c685cf87ab9970db060a.zip
Merge pull request #16751 from opensourcerouting/fix/solo_peer-group
bgpd: Some peer-groups related changes/fixes
Diffstat (limited to 'bgpd/bgp_vty.c')
-rw-r--r--bgpd/bgp_vty.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c
index f5d02eda9..f669564bb 100644
--- a/bgpd/bgp_vty.c
+++ b/bgpd/bgp_vty.c
@@ -17084,8 +17084,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");
@@ -18690,11 +18695,8 @@ static void bgp_config_write_peer_global(struct vty *vty, struct bgp *bgp,
peer->password);
/* neighbor solo */
- if (CHECK_FLAG(peer->flags, PEER_FLAG_LONESOUL)) {
- if (!peer_group_active(peer)) {
- vty_out(vty, " neighbor %s solo\n", addr);
- }
- }
+ if (peergroup_flag_check(peer, PEER_FLAG_LONESOUL))
+ vty_out(vty, " neighbor %s solo\n", addr);
/* BGP port */
if (peer->port != BGP_PORT_DEFAULT) {