return CMD_SUCCESS;
if (ctx->subgrp_id) {
- UPDGRP_FOREACH_SUBGRP(updgrp, subgrp)
- {
+ UPDGRP_FOREACH_SUBGRP (updgrp, subgrp) {
if (ctx->subgrp_id && (ctx->subgrp_id != subgrp->id))
continue;
else {
? " replace-as"
: "");
- UPDGRP_FOREACH_SUBGRP(updgrp, subgrp)
- {
+ UPDGRP_FOREACH_SUBGRP (updgrp, subgrp) {
if (ctx->subgrp_id && (ctx->subgrp_id != subgrp->id))
continue;
vty_out(vty, "\n");
: "");
if (subgrp->peer_count > 0) {
vty_out(vty, " Peers:\n");
- SUBGRP_FOREACH_PEER(subgrp, paf)
- vty_out(vty, " - %s\n", paf->peer->host);
+ SUBGRP_FOREACH_PEER (subgrp, paf)
+ vty_out(vty, " - %s\n", paf->peer->host);
}
}
return UPDWALK_CONTINUE;
struct vty *vty;
vty = ctx->vty;
- UPDGRP_FOREACH_SUBGRP(updgrp, subgrp)
- {
+ UPDGRP_FOREACH_SUBGRP (updgrp, subgrp) {
if (ctx->subgrp_id && (ctx->subgrp_id != subgrp->id))
continue;
vty_out(vty, "update group %" PRIu64 ", subgroup %" PRIu64 "\n",
if (!peer_established(PAF_PEER(paf)))
return NULL;
- UPDGRP_FOREACH_SUBGRP(updgrp, subgrp)
- {
+ UPDGRP_FOREACH_SUBGRP (updgrp, subgrp) {
if (subgrp->version != version
|| CHECK_FLAG(subgrp->sflags,
SUBGRP_STATUS_DEFAULT_ORIGINATE))
/*
* Look for a subgroup to merge into.
*/
- UPDGRP_FOREACH_SUBGRP(subgrp->update_group, target)
- {
+ UPDGRP_FOREACH_SUBGRP (subgrp->update_group, target) {
if (update_subgroup_can_merge_into(subgrp, target))
break;
}
{
struct bgp_adj_out *aout, *aout_copy;
- SUBGRP_FOREACH_ADJ(source, aout)
- {
+ SUBGRP_FOREACH_ADJ (source, aout) {
/*
* Copy the adj out.
*/
* refresh.
*/
if (ctx->policy_event_start_flag) {
- UPDGRP_FOREACH_SUBGRP(updgrp, subgrp)
- {
+ UPDGRP_FOREACH_SUBGRP (updgrp, subgrp) {
update_subgroup_set_needs_refresh(subgrp, 1);
}
return UPDWALK_CONTINUE;
}
- UPDGRP_FOREACH_SUBGRP(updgrp, subgrp)
- {
+ UPDGRP_FOREACH_SUBGRP (updgrp, subgrp) {
if (changed) {
if (bgp_debug_update(NULL, NULL, updgrp, 0))
zlog_debug(
struct update_subgroup *tmp_subgrp;
const char *reason = arg;
- UPDGRP_FOREACH_SUBGRP_SAFE(updgrp, subgrp, tmp_subgrp)
- update_subgroup_check_merge(subgrp, reason);
+ UPDGRP_FOREACH_SUBGRP_SAFE (updgrp, subgrp, tmp_subgrp)
+ update_subgroup_check_merge(subgrp, reason);
return UPDWALK_CONTINUE;
}
{
int afid;
- AF_FOREACH(afid)
+ AF_FOREACH (afid)
bgp->update_groups[afid] =
hash_create(updgrp_hash_key_make,
updgrp_hash_cmp,
{
int afid;
- AF_FOREACH(afid)
- {
+ AF_FOREACH (afid) {
if (bgp->update_groups[afid]) {
hash_free(bgp->update_groups[afid]);
bgp->update_groups[afid] = NULL;
afi_t afi;
safi_t safi;
- FOREACH_AFI_SAFI(afi, safi)
- {
+ FOREACH_AFI_SAFI (afi, safi) {
update_group_af_walk(bgp, afi, safi, cb, ctx);
}
}
afi_t afi;
safi_t safi;
- UPDGRP_FOREACH_SUBGRP(updgrp, subgrp)
- {
+ UPDGRP_FOREACH_SUBGRP (updgrp, subgrp) {
peer = SUBGRP_PEER(subgrp);
afi = SUBGRP_AFI(subgrp);
safi = SUBGRP_SAFI(subgrp);
*/
all_pending = 1;
- SUBGRP_FOREACH_PEER(subgrp, cur_paf)
- {
+ SUBGRP_FOREACH_PEER (subgrp, cur_paf) {
if (cur_paf == paf)
continue;
*
* First stop refresh timers on all the other peers.
*/
- SUBGRP_FOREACH_PEER(subgrp, cur_paf)
- {
+ SUBGRP_FOREACH_PEER (subgrp, cur_paf) {
if (cur_paf == paf)
continue;
zlog_debug("u%llu:s%llu scheduling write thread for peers",
subgrp->update_group->id, subgrp->id);
#endif
- SUBGRP_FOREACH_PEER(subgrp, paf)
- {
+ SUBGRP_FOREACH_PEER (subgrp, paf) {
if (paf->peer->status == Established) {
BGP_PEER_WRITE_ON(paf->peer->t_write, bgp_write,
paf->peer->fd, paf->peer);