- struct route_node *next, *parent;
-
- /* For a non src-dest node, just return route_next */
- if (!(rnode_is_dstnode(rn) || rnode_is_srcnode(rn)))
- return route_next(rn);
-
- if (rnode_is_dstnode(rn))
- {
- /* This means the route_node is part of the top hierarchy
- * and refers to a destination prefix. */
- struct srcdest_rnode *srn = srcdest_rnode_from_rnode(rn);
-
- if (srn->src_table)
- next = route_top(srn->src_table);
- else
- next = NULL;
-
- if (next)
- {
- /* There is a source prefix. Return the node for it */
- route_unlock_node(rn);
- return next;
- }
- else
- {
- /* There is no source prefix, just continue as usual */
- return route_next(rn);
- }
- }
-
- /* This part handles the case of iterating source nodes. */
- parent = route_lock_node(rn->table->info);
- next = route_next(rn);
-
- if (next)
- {
- /* There is another source node, continue in the source table */
- route_unlock_node(parent);
- return next;
- }
- else
- {
- /* The source table is complete, continue in the parent table */
- return route_next(parent);
- }
+ struct route_node *next, *parent;
+
+ /* For a non src-dest node, just return route_next */
+ if (!(rnode_is_dstnode(rn) || rnode_is_srcnode(rn)))
+ return route_next(rn);
+
+ if (rnode_is_dstnode(rn)) {
+ /* This means the route_node is part of the top hierarchy
+ * and refers to a destination prefix. */
+ struct srcdest_rnode *srn = srcdest_rnode_from_rnode(rn);
+
+ if (srn->src_table)
+ next = route_top(srn->src_table);
+ else
+ next = NULL;
+
+ if (next) {
+ /* There is a source prefix. Return the node for it */
+ route_unlock_node(rn);
+ return next;
+ } else {
+ /* There is no source prefix, just continue as usual */
+ return route_next(rn);
+ }
+ }
+
+ /* This part handles the case of iterating source nodes. */
+ parent = route_lock_node(rn->table->info);
+ next = route_next(rn);
+
+ if (next) {
+ /* There is another source node, continue in the source table */
+ route_unlock_node(parent);
+ return next;
+ } else {
+ /* The source table is complete, continue in the parent table */
+ return route_next(parent);
+ }