summaryrefslogtreecommitdiffstats
path: root/lib/srcdest_table.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2018-08-31 01:11:39 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2018-09-24 02:04:39 +0200
commit6ca30e9ec6ed84d5ace735912bf69c45050adda6 (patch)
tree2ffadfc6d1acf3f2019e9e96c552312af7b3aca9 /lib/srcdest_table.c
parentMerge pull request #3071 from donaldsharp/fix_vrf_name (diff)
downloadfrr-6ca30e9ec6ed84d5ace735912bf69c45050adda6.tar.xz
frr-6ca30e9ec6ed84d5ace735912bf69c45050adda6.zip
bgpd, lib, zebra: Wrapper get/set of table->info pointer
Wrapper the get/set of the table->info pointer so that people are not directly accessing this data. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'lib/srcdest_table.c')
-rw-r--r--lib/srcdest_table.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/srcdest_table.c b/lib/srcdest_table.c
index e49735192..80004b41a 100644
--- a/lib/srcdest_table.c
+++ b/lib/srcdest_table.c
@@ -103,7 +103,7 @@ static void srcdest_srcnode_destroy(route_table_delegate_t *delegate,
XFREE(MTYPE_ROUTE_SRC_NODE, rn);
- srn = table->info;
+ srn = route_table_get_info(table);
if (srn->src_table && route_table_count(srn->src_table) == 0) {
/* deleting the route_table from inside destroy_node is ONLY
* permitted IF table->count is 0! see lib/table.c
@@ -140,7 +140,7 @@ static struct route_node *srcdest_srcnode_get(struct route_node *rn,
* here */
srn->src_table = route_table_init_with_delegate(
&_srcdest_srcnode_delegate);
- srn->src_table->info = srn;
+ route_table_set_info(srn->src_table, srn);
/* there is no route_unlock_node on the original rn here.
* The reference is kept for the src_table. */
@@ -220,7 +220,7 @@ struct route_node *srcdest_route_next(struct route_node *rn)
}
/* This part handles the case of iterating source nodes. */
- parent = route_lock_node(rn->table->info);
+ parent = route_lock_node(route_table_get_info(rn->table));
next = route_next(rn);
if (next) {
@@ -268,7 +268,7 @@ void srcdest_rnode_prefixes(struct route_node *rn, const struct prefix **p,
const struct prefix **src_p)
{
if (rnode_is_srcnode(rn)) {
- struct route_node *dst_rn = rn->table->info;
+ struct route_node *dst_rn = route_table_get_info(rn->table);
if (p)
*p = &dst_rn->p;
if (src_p)