]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: Allow using `solo` for peer-groups
authorDonatas Abraitis <donatas@opensourcerouting.org>
Thu, 5 Sep 2024 12:16:05 +0000 (15:16 +0300)
committerDonatas Abraitis <donatas@opensourcerouting.org>
Thu, 5 Sep 2024 12:16:05 +0000 (15:16 +0300)
Inherit solo flag for peer-group members also.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
bgpd/bgp_updgrp.c
bgpd/bgp_vty.c
bgpd/bgpd.c
doc/user/bgp.rst

index b717793a4568a8c068d2b72d0df44884badaafba..115bc35cdcad695846122cd9e368a23f2964ca8c 100644 (file)
@@ -2016,6 +2016,8 @@ int update_group_adjust_soloness(struct peer *peer, int set)
        struct peer_group *group;
        struct listnode *node, *nnode;
 
+       peer_flag_set(peer, PEER_FLAG_LONESOUL);
+
        if (!CHECK_FLAG(peer->sflags, PEER_STATUS_GROUP)) {
                peer_lonesoul_or_not(peer, set);
                if (peer_established(peer->connection))
index c9c7b80496448ce68c773d76a0982d12aa97a813..338f6e3a5005be8704b9c8e47e019ed617d9fd60 100644 (file)
@@ -18678,11 +18678,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) {
index a88de651f50c7d8aea8cb2c9081e6a579d283aeb..ad45f5d6e9321a9bee521e9b27e6f3e118553d8a 100644 (file)
@@ -4701,6 +4701,7 @@ static const struct peer_flag_action peer_flag_action_list[] = {
        {PEER_FLAG_CAPABILITY_FQDN, 0, peer_change_none},
        {PEER_FLAG_AS_LOOP_DETECTION, 0, peer_change_none},
        {PEER_FLAG_EXTENDED_LINK_BANDWIDTH, 0, peer_change_none},
+       {PEER_FLAG_LONESOUL, 0, peer_change_reset_out},
        {0, 0, 0}};
 
 static const struct peer_flag_action peer_af_flag_action_list[] = {
index aa62d274f03f19b542326aeed2ac3cf4d5991394..b6d289fac9292b72552b5dde1b2ecea2810c6316 100644 (file)
@@ -2191,8 +2191,7 @@ and will share updates.
 .. clicmd:: neighbor PEER solo
 
    This command is used to indicate that routes advertised by the peer
-   should not be reflected back to the peer.  This command only is only
-   meaningful when there is a single peer defined in the peer-group.
+   should not be reflected back to the peer.
 
 .. clicmd:: show [ip] bgp peer-group [json]