diff options
Diffstat (limited to 'bgpd/rfapi/rfapi.c')
| -rw-r--r-- | bgpd/rfapi/rfapi.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/bgpd/rfapi/rfapi.c b/bgpd/rfapi/rfapi.c index 6978dd145d..4fffe94a83 100644 --- a/bgpd/rfapi/rfapi.c +++ b/bgpd/rfapi/rfapi.c @@ -382,9 +382,10 @@ void del_vnc_route(struct rfapi_descriptor *rfd, vnc_zlog_debug_verbose( "%s: peer=%p, prefix=%s, prd=%s afi=%d, safi=%d bn=%p, bn->info=%p", __func__, peer, buf, prefix_rd2str(prd, buf2, sizeof(buf2)), - afi, safi, bn, (bn ? bn->info : NULL)); + afi, safi, bn, (bn ? bgp_node_get_bgp_path_info(bn) : NULL)); - for (bpi = (bn ? bn->info : NULL); bpi; bpi = bpi->next) { + for (bpi = (bn ? bgp_node_get_bgp_path_info(bn) : NULL); bpi; + bpi = bpi->next) { vnc_zlog_debug_verbose( "%s: trying bpi=%p, bpi->peer=%p, bpi->type=%d, bpi->sub_type=%d, bpi->extra->vnc.export.rfapi_handle=%p, local_pref=%u", @@ -945,7 +946,7 @@ void add_vnc_route(struct rfapi_descriptor *rfd, /* cookie, VPN UN addr, peer */ * ecommunity: POINTS TO interned/refcounted dynamic 2-part AS attr * aspath: POINTS TO interned/refcounted hashed block */ - for (bpi = bn->info; bpi; bpi = bpi->next) { + for (bpi = bgp_node_get_bgp_path_info(bn); bpi; bpi = bpi->next) { /* probably only need to check * bpi->extra->vnc.export.rfapi_handle */ if (bpi->peer == rfd->peer && bpi->type == type @@ -1081,7 +1082,7 @@ void add_vnc_route(struct rfapi_descriptor *rfd, /* cookie, VPN UN addr, peer */ /* debug */ if (VNC_DEBUG(VERBOSE)) { - vnc_zlog_debug_verbose("%s: printing BI", __func__); + vnc_zlog_debug_verbose("%s: printing BPI", __func__); rfapiPrintBi(NULL, new); } @@ -3701,10 +3702,12 @@ static void rfapi_print_exported(struct bgp *bgp) fprintf(stderr, "%s: vpn rdn=%p\n", __func__, rdn); for (rn = bgp_table_top(rdn->info); rn; rn = bgp_route_next(rn)) { - if (!rn->info) + bpi = bgp_node_get_bgp_path_info(rn); + + if (!bpi) continue; fprintf(stderr, "%s: rn=%p\n", __func__, rn); - for (bpi = rn->info; bpi; bpi = bpi->next) { + for (; bpi; bpi = bpi->next) { rfapiPrintBi((void *)2, bpi); /* 2 => stderr */ } } @@ -3716,10 +3719,11 @@ static void rfapi_print_exported(struct bgp *bgp) fprintf(stderr, "%s: encap rdn=%p\n", __func__, rdn); for (rn = bgp_table_top(rdn->info); rn; rn = bgp_route_next(rn)) { - if (!rn->info) + bpi = bgp_node_get_bgp_path_info(rn); + if (!bpi) continue; fprintf(stderr, "%s: rn=%p\n", __func__, rn); - for (bpi = rn->info; bpi; bpi = bpi->next) { + for (; bpi; bpi = bpi->next) { rfapiPrintBi((void *)2, bpi); /* 2 => stderr */ } } |
