]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: Do not delete peer_af when deactivating peer-group. 9145/head
authorzyxwvu Shi <shiyuchen.syc@bytedance.com>
Wed, 26 May 2021 02:33:55 +0000 (10:33 +0800)
committermergify-bot <noreply@mergify.io>
Fri, 23 Jul 2021 09:15:54 +0000 (09:15 +0000)
There is no peer_af allocated in `peer_activate`. Trying to delete
the structure just results in an no-op and a error return value.
The error message "couldn't delete af structure for peer" is
unexpected.

Signed-off-by: zyxwvu Shi <shiyuchen.syc@bytedance.com>
(cherry picked from commit 3057d1e45af0c7789a3b7adfcae882b0234fbf4c)

bgpd/bgpd.c

index 3c7657318213e68b399c8cb81315b148b88928bd..597627b2f08c7107dd28759c8b7b6b8c5f1f04b3 100644 (file)
@@ -2310,13 +2310,6 @@ int peer_deactivate(struct peer *peer, afi_t afi, safi_t safi)
                peer->afc[afi][safi] = 0;
                group = peer->group;
 
-               if (peer_af_delete(peer, afi, safi) != 0) {
-                       flog_err(
-                               EC_BGP_PEER_DELETE,
-                               "couldn't delete af structure for peer %s(%s, %s)",
-                               peer->host, afi2str(afi), safi2str(safi));
-               }
-
                for (ALL_LIST_ELEMENTS(group->peer, node, nnode, tmp_peer)) {
                        ret |= non_peergroup_deactivate_af(tmp_peer, afi, safi);
                }