]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: Do not delete peer_af when deactivating peer-group.
authorzyxwvu Shi <shiyuchen.syc@bytedance.com>
Wed, 26 May 2021 02:33:55 +0000 (10:33 +0800)
committerzyxwvu Shi <shiyuchen.syc@bytedance.com>
Tue, 6 Jul 2021 11:51:39 +0000 (19:51 +0800)
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>
bgpd/bgpd.c

index 197133cbb41c849019ecc79690926c27cb26f3bc..2f35bbf9e7188fb3f039c6c29e95ed1f725a1122 100644 (file)
@@ -2315,13 +2315,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);
                }