diff options
| author | Lou Berger <lberger@labn.net> | 2018-12-11 11:13:25 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-12-11 11:13:25 -0500 |
| commit | 9bdb632c68428cc20a92e00d593ae90cb94690ad (patch) | |
| tree | ce01e44e50fe0c627e51d4c1123a3c194fa30954 /bgpd/bgp_table.c | |
| parent | 27dcf6d9018a2a0868f844fefac2023397019ed7 (diff) | |
| parent | cb8c85abd3f0721c0480e7245f6e783105be7289 (diff) | |
Merge pull request #3093 from donaldsharp/bgp_node_continued
Bgp node continued
Diffstat (limited to 'bgpd/bgp_table.c')
| -rw-r--r-- | bgpd/bgp_table.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bgpd/bgp_table.c b/bgpd/bgp_table.c index 0321412263..ecde71279d 100644 --- a/bgpd/bgp_table.c +++ b/bgpd/bgp_table.c @@ -158,7 +158,8 @@ void bgp_table_range_lookup(const struct bgp_table *table, struct prefix *p, while (node && node->p.prefixlen <= p->prefixlen && prefix_match(&node->p, p)) { - if (node->info && node->p.prefixlen == p->prefixlen) { + if (bgp_node_has_bgp_path_info_data(node) + && node->p.prefixlen == p->prefixlen) { matched = node; break; } @@ -174,14 +175,14 @@ void bgp_table_range_lookup(const struct bgp_table *table, struct prefix *p, else if (matched == NULL) matched = node = bgp_node_from_rnode(node->parent); - if (matched->info) { + if (bgp_node_has_bgp_path_info_data(matched)) { bgp_lock_node(matched); listnode_add(matches, matched); } while ((node = bgp_route_next_until_maxlen(node, matched, maxlen))) { if (prefix_match(p, &node->p)) { - if (node->info) { + if (bgp_node_has_bgp_path_info_data(node)) { bgp_lock_node(node); listnode_add(matches, node); } |
