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)
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);
}