]> git.proxmox.com Git - mirror_frr.git/blobdiff - bgpd/bgp_advertise.c
zebra: Refactor kernel_rtm to be a bit smarter about how it handles options
[mirror_frr.git] / bgpd / bgp_advertise.c
index be47cbb6d8a203b0d0ecf8d8561bdc120760a19b..208a2947ef1ca5cf14bc41ac4a57f5fb579d9743 100644 (file)
@@ -71,7 +71,7 @@ unsigned int baa_hash_key(void *p)
        return attrhash_key_make(baa->attr);
 }
 
-int baa_hash_cmp(const void *p1, const void *p2)
+bool baa_hash_cmp(const void *p1, const void *p2)
 {
        const struct bgp_advertise_attr *baa1 = p1;
        const struct bgp_advertise_attr *baa2 = p2;
@@ -154,7 +154,7 @@ int bgp_adj_out_lookup(struct peer *peer, struct bgp_node *rn,
        safi_t safi;
        int addpath_capable;
 
-       for (adj = rn->adj_out; adj; adj = adj->next)
+       RB_FOREACH (adj, bgp_adj_out_rb, &rn->adj_out)
                SUBGRP_FOREACH_PEER (adj->subgroup, paf)
                        if (paf->peer == peer) {
                                afi = SUBGRP_AFI(adj->subgroup);