return CMD_WARNING_CONFIG_FAILED;
}
- bgp_static = rn->info;
+ bgp_static = bgp_static_get_node_info(rn);
if ((label_index != BGP_INVALID_LABEL_INDEX)
&& (label_index != bgp_static->label_index)) {
/* Clear configuration. */
bgp_static_free(bgp_static);
- rn->info = NULL;
+ bgp_static_set_node_info(rn, NULL);
bgp_unlock_node(rn);
bgp_unlock_node(rn);
} else {
/* Set BGP static route configuration. */
rn = bgp_node_get(bgp->route[afi][safi], &p);
- if (rn->info) {
+ bgp_static = bgp_static_get_node_info(rn);
+ if (bgp_static) {
/* Configuration change. */
- bgp_static = rn->info;
-
/* Label index cannot be changed. */
if (bgp_static->label_index != label_index) {
vty_out(vty, "%% cannot change label-index\n");
bgp_static->rmap.map =
route_map_lookup_by_name(rmap);
}
- rn->info = bgp_static;
+ bgp_static_set_node_info(rn, bgp_static);
}
bgp_static->valid = 1;
for (rm = bgp_table_top(table); rm;
rm = bgp_route_next(rm)) {
- bgp_static = rm->info;
+ bgp_static =
+ bgp_static_get_node_info(rm);
bgp_static_update_safi(bgp, &rm->p,
bgp_static, afi,
safi);
}
} else {
- bgp_static_update(bgp, &rn->p, rn->info, afi,
- safi);
+ bgp_static_update(bgp, &rn->p,
+ bgp_static_get_node_info(rn),
+ afi, safi);
}
}
}
for (rm = bgp_table_top(table); rm;
rm = bgp_route_next(rm)) {
- bgp_static = rm->info;
+ bgp_static =
+ bgp_static_get_node_info(rm);
bgp_static_withdraw_safi(
bgp, &rm->p, AFI_IP, safi,
(struct prefix_rd *)&rn->p);
bgp_static_free(bgp_static);
- rn->info = NULL;
+ bgp_static_set_node_info(rn, NULL);
bgp_unlock_node(rn);
}
} else {
- bgp_static = rn->info;
+ bgp_static = bgp_static_get_node_info(rn);
bgp_static_withdraw(bgp, &rn->p, afi, safi);
bgp_static_free(bgp_static);
- rn->info = NULL;
+ bgp_static_set_node_info(rn, NULL);
bgp_unlock_node(rn);
}
}
for (rm = bgp_table_top(table); rm;
rm = bgp_route_next(rm)) {
- bgp_static = rm->info;
+ bgp_static =
+ bgp_static_get_node_info(rm);
bgp_static_update_safi(bgp, &rm->p,
bgp_static, afi,
safi);
}
} else {
- bgp_static = rn->info;
+ bgp_static = bgp_static_get_node_info(rn);
bgp_static_update(bgp, &rn->p, bgp_static, afi,
safi);
}
if (gwip)
prefix_copy(&bgp_static->gatewayIp, &gw_ip);
}
- rn->info = bgp_static;
+ bgp_static_set_node_info(rn, bgp_static);
bgp_static->valid = 1;
bgp_static_update_safi(bgp, &p, bgp_static, afi, safi);
if (rn) {
bgp_static_withdraw_safi(bgp, &p, afi, safi, &prd);
- bgp_static = rn->info;
+ bgp_static = bgp_static_get_node_info(rn);
bgp_static_free(bgp_static);
- rn->info = NULL;
+ bgp_static_set_node_info(rn, NULL);
bgp_unlock_node(rn);
bgp_unlock_node(rn);
} else
bgp_unlock_node(rn);
else {
bdistance = bgp_distance_new();
- bgp_distance_set_node(rn, bdistance);
+ bgp_distance_set_node_info(rn, bdistance);
}
/* Set distance value. */
/* Backdoor check. */
rn = bgp_node_lookup(bgp->route[afi][safi], p);
if (rn) {
- bgp_static = rn->info;
+ bgp_static = bgp_static_get_node_info(rn);
bgp_unlock_node(rn);
if (bgp_static->backdoor) {
continue;
for (rn = bgp_table_top(table); rn; rn = bgp_route_next(rn)) {
- if ((bgp_static = rn->info) == NULL)
+ bgp_static = bgp_static_get_node_info(rn);
+ if (bgp_static == NULL)
continue;
p = &rn->p;
continue;
for (rn = bgp_table_top(table); rn; rn = bgp_route_next(rn)) {
- if ((bgp_static = rn->info) == NULL)
+ bgp_static = bgp_static_get_node_info(rn);
+ if (bgp_static == NULL)
continue;
char *macrouter = NULL;
/* Network configuration. */
for (rn = bgp_table_top(bgp->route[afi][safi]); rn;
rn = bgp_route_next(rn)) {
- if ((bgp_static = rn->info) == NULL)
+ bgp_static = bgp_static_get_node_info(rn);
+ if (bgp_static == NULL)
continue;
p = &rn->p;