ldpd: fix fallouts from the rb-tree conversion

Signed-off-by: Renato Westphal <renato@openbsd.org>
This commit is contained in:
Renato Westphal 2017-06-16 17:30:35 -03:00
parent 8f942af902
commit 522faa1f8b
3 changed files with 5 additions and 5 deletions

View File

@ -163,7 +163,7 @@ adj_find(struct in_addr lsr_id, struct hello_source *source)
}
int
adj_get_af(struct adj *adj)
adj_get_af(const struct adj *adj)
{
switch (adj->source.type) {
case HELLO_LINK:

View File

@ -81,12 +81,12 @@ ldpe_if_init(struct iface *iface)
/* ipv4 */
iface->ipv4.iface = iface;
iface->ipv4.state = IF_STA_DOWN;
RB_INIT(iface_head, &iface->ipv4.adj_tree);
RB_INIT(ia_adj_head, &iface->ipv4.adj_tree);
/* ipv6 */
iface->ipv6.iface = iface;
iface->ipv6.state = IF_STA_DOWN;
RB_INIT(iface_head, &iface->ipv6.adj_tree);
RB_INIT(ia_adj_head, &iface->ipv6.adj_tree);
}
void
@ -305,7 +305,7 @@ if_reset(struct iface *iface, int af)
ia = iface_af_get(iface, af);
if_stop_hello_timer(ia);
while ((adj = RB_ROOT(iface_head, &ia->adj_tree)) != NULL)
while ((adj = RB_ROOT(ia_adj_head, &ia->adj_tree)) != NULL)
adj_del(adj, S_SHUTDOWN);
/* try to cleanup */

View File

@ -237,7 +237,7 @@ struct adj *adj_new(struct in_addr, struct hello_source *,
union ldpd_addr *);
void adj_del(struct adj *, uint32_t);
struct adj *adj_find(struct in_addr, struct hello_source *);
int adj_get_af(struct adj *adj);
int adj_get_af(const struct adj *adj);
void adj_start_itimer(struct adj *);
void adj_stop_itimer(struct adj *);
struct tnbr *tnbr_new(int, union ldpd_addr *);