if (!rn)
continue;
- RNODE_FOREACH_RE(rn, newre)
- if (CHECK_FLAG(newre->flags, ZEBRA_FLAG_SELECTED)
- && newre->distance != DISTANCE_INFINITY)
- zsend_redistribute_route(ZEBRA_REDISTRIBUTE_ROUTE_ADD,
- client, &rn->p, NULL, newre);
+ RNODE_FOREACH_RE(rn, newre) {
+ if (CHECK_FLAG(newre->flags, ZEBRA_FLAG_SELECTED)
+ && newre->distance != DISTANCE_INFINITY)
+ zsend_redistribute_route(
+ ZEBRA_REDISTRIBUTE_ROUTE_ADD,
+ client, &rn->p, NULL, newre);
+ }
route_unlock_node(rn);
}
for (rn = route_top(table); rn; rn = route_next(rn)) {
update = 0;
- RNODE_FOREACH_RE(rn, re)
- for (nexthop = re->nexthop; nexthop; nexthop = nexthop->next)
- if (nexthop->nh_label_type == ZEBRA_LSP_LDP) {
+ RNODE_FOREACH_RE(rn, re) {
+ for (nexthop = re->nexthop;
+ nexthop;
+ nexthop = nexthop->next) {
+ if (nexthop->nh_label_type != ZEBRA_LSP_LDP)
+ continue;
+
nexthop_del_labels(nexthop);
SET_FLAG(re->status, ROUTE_ENTRY_CHANGED);
SET_FLAG(re->status,
ROUTE_ENTRY_LABELS_CHANGED);
update = 1;
}
+ }
if (update)
rib_queue_add(rn);
/* Return number of routing entries. */
result = 0;
for (rn = route_top(table); rn; rn = route_next(rn))
- RNODE_FOREACH_RE(rn, re)
- result++;
+ RNODE_FOREACH_RE(rn, re) {
+ result++;
+ }
return (u_char *)&result;
}
/* Return number of routing entries. */
result = 0;
for (rn = route_top(table); rn; rn = route_next(rn))
- RNODE_FOREACH_RE(rn, re)
- result++;
+ RNODE_FOREACH_RE(rn, re) {
+ result++;
+ }
return (u_char *)&result;
}
/* Check destination first */
if (in_addr_cmp(&np2->p.u.prefix, (u_char *)&dest) > 0)
- RNODE_FOREACH_RE(np2, re2)
- check_replace(np2, re2, np, re);
+ RNODE_FOREACH_RE(np2, re2) {
+ check_replace(np2, re2, np, re);
+ }
if (in_addr_cmp(&np2->p.u.prefix, (u_char *)&dest)
== 0) { /* have to look at each re individually */
{
struct route_entry *re, *next;
- RNODE_FOREACH_RE_SAFE(node, re, next)
- rib_unlink(node, re);
+ RNODE_FOREACH_RE_SAFE(node, re, next) {
+ rib_unlink(node, re);
+ }
if (node->info)
XFREE(MTYPE_RIB_DEST, node->info);