/*
* match parent
*/
- for (bpi = bn->info; bpi; bpi = bpi->next) {
+ for (bpi = bgp_node_get_bgp_path_info(bn); bpi; bpi = bpi->next) {
if (bpi->extra && bpi->extra->parent == parent)
break;
}
bn = bgp_afi_node_get(bgp_vpn->rib[afi][safi], afi, safi, p,
&(bgp_vrf->vpn_policy[afi].tovpn_rd));
+ if (!bn)
+ return;
/*
* vrf -> vpn
* match original bpi imported from
*/
- for (bpi = (bn ? bn->info : NULL); bpi; bpi = bpi->next) {
+ for (bpi = bgp_node_get_bgp_path_info(bn); bpi; bpi = bpi->next) {
if (bpi->extra && bpi->extra->parent == path_vrf) {
break;
}
struct bgp_path_info *bpi;
/* This is the per-RD table of prefixes */
- table = prn->info;
+ table = bgp_node_get_bgp_table_info(prn);
if (!table)
continue;
char buf[PREFIX2STR_BUFFER];
- if (debug && bn->info) {
+ bpi = bgp_node_get_bgp_path_info(bn);
+ if (debug && bpi) {
zlog_debug(
"%s: looking at prefix %s", __func__,
prefix2str(&bn->p, buf, sizeof(buf)));
}
- for (bpi = bn->info; bpi; bpi = bpi->next) {
+ for (; bpi; bpi = bpi->next) {
if (debug)
zlog_debug("%s: type %d, sub_type %d",
__func__, bpi->type,
if (debug)
zlog_debug("%s: node=%p", __func__, bn);
- for (bpi = bn->info; bpi; bpi = bpi->next) {
+ for (bpi = bgp_node_get_bgp_path_info(bn); bpi;
+ bpi = bpi->next) {
if (debug)
zlog_debug(
"%s: calling vpn_leak_from_vrf_update",
bgp->name_pretty);
bn = bgp_afi_node_get(bgp->rib[afi][safi], afi, safi, p, NULL);
- for (bpi = (bn ? bn->info : NULL); bpi; bpi = bpi->next) {
+
+ for (bpi = bgp_node_get_bgp_path_info(bn); bpi;
+ bpi = bpi->next) {
if (bpi->extra
&& (struct bgp_path_info *)bpi->extra->parent
== path_vpn) {
for (bn = bgp_table_top(bgp_vrf->rib[afi][safi]); bn;
bn = bgp_route_next(bn)) {
- for (bpi = bn->info; bpi; bpi = bpi->next) {
+ for (bpi = bgp_node_get_bgp_path_info(bn); bpi;
+ bpi = bpi->next) {
if (bpi->extra && bpi->extra->bgp_orig != bgp_vrf) {
/* delete route */
memcpy(prd.val, prn->p.u.val, 8);
/* This is the per-RD table of prefixes */
- table = prn->info;
+ table = bgp_node_get_bgp_table_info(prn);
if (!table)
continue;
for (bn = bgp_table_top(table); bn; bn = bgp_route_next(bn)) {
- for (bpi = bn->info; bpi; bpi = bpi->next) {
+ for (bpi = bgp_node_get_bgp_path_info(bn); bpi;
+ bpi = bpi->next) {
if (bpi->extra
&& bpi->extra->bgp_orig == bgp_vrf)