struct bgp_info_pair old_and_new;
struct attr attr;
struct peer_group *group;
- struct listnode *nn;
+ struct listnode *node, *nnode;
p = &rn->p;
if (CHECK_FLAG(rsclient->sflags, PEER_STATUS_GROUP))
{
group = rsclient->group;
- LIST_LOOP(group->peer, rsclient, nn)
+ for (ALL_LIST_ELEMENTS (group->peer, node, nnode, rsclient))
{
/* Nothing to do. */
if (old_select && old_select == new_select)
struct bgp_info *new_select;
struct bgp_info *old_select;
struct bgp_info_pair old_and_new;
- struct listnode *nn;
+ struct listnode *node, *nnode;
struct peer *peer;
struct attr attr;
/* Check each BGP peer. */
- LIST_LOOP (bgp->peer, peer, nn)
+ for (ALL_LIST_ELEMENTS (bgp->peer, node, nnode, peer))
{
bgp_process_announce_selected (peer, new_select, rn, &attr, afi, safi);
}
struct prefix_rd *prd, u_char *tag, int soft_reconfig)
{
struct peer *rsclient;
- struct listnode *nn;
+ struct listnode *node, *nnode;
struct bgp *bgp;
int ret;
bgp = peer->bgp;
/* Process the update for each RS-client. */
- LIST_LOOP(bgp->rsclient, rsclient, nn)
+ for (ALL_LIST_ELEMENTS (bgp->rsclient, node, nnode, rsclient))
{
if (CHECK_FLAG (rsclient->af_flags[afi][safi], PEER_FLAG_RSERVER_CLIENT))
bgp_update_rsclient (rsclient, afi, safi, attr, peer, p, type,
struct bgp_node *rn;
struct bgp_info *ri;
struct peer *rsclient;
- struct listnode *nn;
+ struct listnode *node, *nnode;
bgp = peer->bgp;
/* Process the withdraw for each RS-client. */
- LIST_LOOP (bgp->rsclient, rsclient, nn)
+ for (ALL_LIST_ELEMENTS (bgp->rsclient, node, nnode, rsclient))
{
if (CHECK_FLAG (rsclient->af_flags[afi][safi], PEER_FLAG_RSERVER_CLIENT))
bgp_withdraw_rsclient (rsclient, afi, safi, peer, p, type, sub_type, prd, tag);
struct bgp_node *rn;
struct bgp_table *table;
struct peer *rsclient;
- struct listnode *nn;
+ struct listnode *node, *nnode;
if (safi != SAFI_MPLS_VPN)
bgp_clear_route_table (peer, afi, safi, NULL, NULL);
if ((table = rn->info) != NULL)
bgp_clear_route_table (peer, afi, safi, table, NULL);
- LIST_LOOP (peer->bgp->rsclient, rsclient, nn)
+ for (ALL_LIST_ELEMENTS (peer->bgp->rsclient, node, nnode, rsclient))
{
if (CHECK_FLAG(rsclient->af_flags[afi][safi], PEER_FLAG_RSERVER_CLIENT))
bgp_clear_route_table (peer, afi, safi, NULL, rsclient);
bgp_cleanup_routes ()
{
struct bgp *bgp;
- struct listnode *nn;
+ struct listnode *node, *nnode;
struct bgp_node *rn;
struct bgp_table *table;
struct bgp_info *ri;
- LIST_LOOP (bm->bgp, bgp, nn)
+ for (ALL_LIST_ELEMENTS (bm->bgp, node, nnode, bgp))
{
table = bgp->rib[AFI_IP][SAFI_UNICAST];
struct bgp_static *bgp_static, afi_t afi, safi_t safi)
{
struct peer *rsclient;
- struct listnode *nn;
+ struct listnode *node, *nnode;
bgp_static_update_main (bgp, p, bgp_static, afi, safi);
- LIST_LOOP(bgp->rsclient, rsclient, nn)
+ for (ALL_LIST_ELEMENTS (bgp->rsclient, node, nnode, rsclient))
{
bgp_static_update_rsclient (rsclient, p, bgp_static, afi, safi);
}
u_int32_t metric, u_char type)
{
struct bgp *bgp;
- struct listnode *nn;
+ struct listnode *node, *nnode;
struct bgp_info *new;
struct bgp_info *bi;
struct bgp_info info;
attr.med = metric;
attr.flag |= ATTR_FLAG_BIT (BGP_ATTR_MULTI_EXIT_DISC);
- LIST_LOOP (bm->bgp, bgp, nn)
+ for (ALL_LIST_ELEMENTS (bm->bgp, node, nnode, bgp))
{
afi = family2afi (p->family);
bgp_redistribute_delete (struct prefix *p, u_char type)
{
struct bgp *bgp;
- struct listnode *nn;
+ struct listnode *node, *nnode;
afi_t afi;
struct bgp_node *rn;
struct bgp_info *ri;
- LIST_LOOP (bm->bgp, bgp, nn)
+ for (ALL_LIST_ELEMENTS (bm->bgp, node, nnode, bgp))
{
afi = family2afi (p->family);
struct bgp_info *ri;
struct prefix *p;
struct peer *peer;
- struct listnode *nn;
+ struct listnode *node, *nnode;
char buf1[INET6_ADDRSTRLEN];
char buf2[INET6_ADDRSTRLEN];
int count = 0;
vty_out (vty, ")%s", VTY_NEWLINE);
/* advertised peer */
- LIST_LOOP (bgp->peer, peer, nn)
+ for (ALL_LIST_ELEMENTS (bgp->peer, node, nnode, peer))
{
if (bgp_adj_out_lookup (peer, p, afi, safi, rn))
{