]> git.puffer.fish Git - mirror/frr.git/commitdiff
ldpd: fix fallouts from the rb-tree conversion
authorRenato Westphal <renato@openbsd.org>
Fri, 16 Jun 2017 20:30:35 +0000 (17:30 -0300)
committerRenato Westphal <renato@openbsd.org>
Fri, 16 Jun 2017 20:30:35 +0000 (17:30 -0300)
Signed-off-by: Renato Westphal <renato@openbsd.org>
ldpd/adjacency.c
ldpd/interface.c
ldpd/ldpe.h

index 8a2252e72248308f6a234788713456d5712bf776..e73d1b51a29097d0ec73370803c297ebf27d01a1 100644 (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:
index 527a6bc9635c8412776a3fc47040e1e0c9d57f47..ac48520f7bd4710dc2591326d6ccacf33739fbea 100644 (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 */
index d34ca4dc246542a09be32d0696f88e78e0aea1b1..74f6b852b0cda4824e89c58f755fa397aebd3d7c 100644 (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 *);