summaryrefslogtreecommitdiff
path: root/ospf6d/ospf6_abr.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2017-07-07 17:23:30 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2017-07-11 13:48:20 +0200
commit49dd8e3758979254e74b8bf3480ea8a607f084b8 (patch)
tree5fe7dc765b9d054e4b965d1c2ae120aa02a27e70 /ospf6d/ospf6_abr.c
parent736ac221d1e89f3f35703d5175057404de62b50b (diff)
ospf6d: use macro for LSDB walks
... to make it easier to refactor all of the iteration uses. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'ospf6d/ospf6_abr.c')
-rw-r--r--ospf6d/ospf6_abr.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/ospf6d/ospf6_abr.c b/ospf6d/ospf6_abr.c
index 7ef7fdd94a..5ef6604ccf 100644
--- a/ospf6d/ospf6_abr.c
+++ b/ospf6d/ospf6_abr.c
@@ -989,13 +989,11 @@ ospf6_abr_examin_brouter (u_int32_t router_id)
return;
type = htons (OSPF6_LSTYPE_INTER_ROUTER);
- for (lsa = ospf6_lsdb_type_router_head (type, router_id, oa->lsdb); lsa;
- lsa = ospf6_lsdb_type_router_next (type, router_id, lsa))
- ospf6_abr_examin_summary (lsa, oa);
+ for (ALL_LSDB_TYPED_ADVRTR(oa->lsdb, type, router_id, lsa))
+ ospf6_abr_examin_summary (lsa, oa);
type = htons (OSPF6_LSTYPE_INTER_PREFIX);
- for (lsa = ospf6_lsdb_type_router_head (type, router_id, oa->lsdb); lsa;
- lsa = ospf6_lsdb_type_router_next (type, router_id, lsa))
+ for (ALL_LSDB_TYPED_ADVRTR(oa->lsdb, type, router_id, lsa))
ospf6_abr_examin_summary (lsa, oa);
}
@@ -1006,13 +1004,11 @@ ospf6_abr_reimport (struct ospf6_area *oa)
u_int16_t type;
type = htons (OSPF6_LSTYPE_INTER_ROUTER);
- for (lsa = ospf6_lsdb_type_head (type, oa->lsdb); lsa;
- lsa = ospf6_lsdb_type_next (type, lsa))
+ for (ALL_LSDB_TYPED(oa->lsdb, type, lsa))
ospf6_abr_examin_summary (lsa, oa);
type = htons (OSPF6_LSTYPE_INTER_PREFIX);
- for (lsa = ospf6_lsdb_type_head (type, oa->lsdb); lsa;
- lsa = ospf6_lsdb_type_next (type, lsa))
+ for (ALL_LSDB_TYPED(oa->lsdb, type, lsa))
ospf6_abr_examin_summary (lsa, oa);
}