summaryrefslogtreecommitdiff
path: root/ldpd/neighbor.c
diff options
context:
space:
mode:
Diffstat (limited to 'ldpd/neighbor.c')
-rw-r--r--ldpd/neighbor.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ldpd/neighbor.c b/ldpd/neighbor.c
index 5addc4dda2..d24ceb1229 100644
--- a/ldpd/neighbor.c
+++ b/ldpd/neighbor.c
@@ -229,7 +229,7 @@ nbr_new(struct in_addr id, int af, int ds_tlv, union ldpd_addr *addr,
if ((nbr = calloc(1, sizeof(*nbr))) == NULL)
fatal(__func__);
- LIST_INIT(&nbr->adj_list);
+ RB_INIT(&nbr->adj_tree);
nbr->state = NBR_STA_PRESENT;
nbr->peerid = 0;
nbr->af = af;
@@ -244,10 +244,10 @@ nbr_new(struct in_addr id, int af, int ds_tlv, union ldpd_addr *addr,
nbr->raddr_scope = scope_id;
nbr->conf_seqnum = 0;
- LIST_FOREACH(adj, &global.adj_list, global_entry) {
+ RB_FOREACH(adj, global_adj_head, &global.adj_tree) {
if (adj->lsr_id.s_addr == nbr->id.s_addr) {
adj->nbr = nbr;
- LIST_INSERT_HEAD(&nbr->adj_list, adj, nbr_entry);
+ RB_INSERT(nbr_adj_head, &nbr->adj_tree, adj);
}
}
@@ -366,7 +366,7 @@ nbr_adj_count(struct nbr *nbr, int af)
struct adj *adj;
int total = 0;
- LIST_FOREACH(adj, &nbr->adj_list, nbr_entry)
+ RB_FOREACH(adj, nbr_adj_head, &nbr->adj_tree)
if (adj_get_af(adj) == af)
total++;
@@ -624,7 +624,7 @@ nbr_establish_connection(struct nbr *nbr)
* Send an extra hello to guarantee that the remote peer has formed
* an adjacency as well.
*/
- LIST_FOREACH(adj, &nbr->adj_list, nbr_entry)
+ RB_FOREACH(adj, nbr_adj_head, &nbr->adj_tree)
send_hello(adj->source.type, adj->source.link.ia,
adj->source.target);