if (ri->peer->pcount[table->afi][table->safi])
ri->peer->pcount[table->afi][table->safi]--;
else
- flog_err(LIB_ERR_DEVELOPMENT,
+ flog_err(EC_LIB_DEVELOPMENT,
"Asked to decrement 0 prefix count for peer");
} else if (BGP_INFO_COUNTABLE(ri)
&& !CHECK_FLAG(ri->flags, BGP_INFO_COUNTED)) {
for (rn = bgp_table_top(peer->bgp->rib[afi][safi]); rn;
rn = bgp_route_next(rn)) {
struct bgp_node *rm;
- struct bgp_info *ri;
/* look for neighbor in tables */
if ((table = rn->info) == NULL)
/* Prefix length check. */
if (p.prefixlen > prefix_blen(&p) * 8) {
flog_err(
- BGP_ERR_UPDATE_RCV,
+ EC_BGP_UPDATE_RCV,
"%s [Error] Update packet error (wrong prefix length %d for afi %u)",
peer->host, p.prefixlen, packet->afi);
return -1;
/* When packet overflow occur return immediately. */
if (pnt + psize > lim) {
flog_err(
- BGP_ERR_UPDATE_RCV,
+ EC_BGP_UPDATE_RCV,
"%s [Error] Update packet error (prefix length %d overflows packet)",
peer->host, p.prefixlen);
return -1;
* prefix */
if (psize > (ssize_t)sizeof(p.u)) {
flog_err(
- BGP_ERR_UPDATE_RCV,
+ EC_BGP_UPDATE_RCV,
"%s [Error] Update packet error (prefix length %d too large for prefix storage %zu)",
peer->host, p.prefixlen, sizeof(p.u));
return -1;
* ignored.
*/
flog_err(
- BGP_ERR_UPDATE_RCV,
+ EC_BGP_UPDATE_RCV,
"%s: IPv4 unicast NLRI is multicast address %s, ignoring",
peer->host, inet_ntoa(p.u.prefix4));
continue;
char buf[BUFSIZ];
flog_err(
- BGP_ERR_UPDATE_RCV,
+ EC_BGP_UPDATE_RCV,
"%s: IPv6 unicast NLRI is link-local address %s, ignoring",
peer->host,
inet_ntop(AF_INET6, &p.u.prefix6, buf,
char buf[BUFSIZ];
flog_err(
- BGP_ERR_UPDATE_RCV,
+ EC_BGP_UPDATE_RCV,
"%s: IPv6 unicast NLRI is multicast address %s, ignoring",
peer->host,
inet_ntop(AF_INET6, &p.u.prefix6, buf,
/* Packet length consistency check. */
if (pnt != lim) {
flog_err(
- BGP_ERR_UPDATE_RCV,
+ EC_BGP_UPDATE_RCV,
"%s [Error] Update packet error (prefix length mismatch with total length)",
peer->host);
return -1;
break;
if (ri) {
- union gw_addr add;
memset(&add, 0, sizeof(union gw_addr));
if (attrhash_cmp(ri->attr, attr_new)
&& overlay_index_equal(afi, ri, bgp_static->eth_s_id, &add)
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
XFREE(MTYPE_BGP_AGGREGATE, aggregate);
}
-static int bgp_aggregate_info_same(struct bgp_info *ri, struct aspath *aspath,
+static int bgp_aggregate_info_same(struct bgp_info *ri, uint8_t origin,
+ struct aspath *aspath,
struct community *comm)
{
static struct aspath *ae = NULL;
if (!ri)
return 0;
+ if (origin != ri->attr->origin)
+ return 0;
+
if (!aspath_cmp(ri->attr->aspath, (aspath) ? aspath : ae))
return 0;
* If the aggregate information has not changed
* no need to re-install it again.
*/
- if (bgp_aggregate_info_same(rn->info, aspath, community)) {
+ if (bgp_aggregate_info_same(rn->info, origin, aspath,
+ community)) {
bgp_unlock_node(rn);
if (aspath)
child = bgp_node_get(table, p);
/* Aggregate address configuration check. */
- for (rn = child; rn; rn = bgp_node_parent_nolock(rn))
- if ((aggregate = rn->info) != NULL
- && rn->p.prefixlen < p->prefixlen) {
+ for (rn = child; rn; rn = bgp_node_parent_nolock(rn)) {
+ aggregate = bgp_aggregate_get_node_info(rn);
+ if (aggregate != NULL && rn->p.prefixlen < p->prefixlen) {
bgp_aggregate_delete(bgp, &rn->p, afi, safi, aggregate);
bgp_aggregate_route(bgp, &rn->p, ri, afi, safi, NULL,
aggregate);
}
+ }
bgp_unlock_node(child);
}
child = bgp_node_get(table, p);
/* Aggregate address configuration check. */
- for (rn = child; rn; rn = bgp_node_parent_nolock(rn))
- if ((aggregate = rn->info) != NULL
- && rn->p.prefixlen < p->prefixlen) {
+ for (rn = child; rn; rn = bgp_node_parent_nolock(rn)) {
+ aggregate = bgp_aggregate_get_node_info(rn);
+ if (aggregate != NULL && rn->p.prefixlen < p->prefixlen) {
bgp_aggregate_delete(bgp, &rn->p, afi, safi, aggregate);
bgp_aggregate_route(bgp, &rn->p, NULL, afi, safi, del,
aggregate);
}
+ }
bgp_unlock_node(child);
}
return CMD_WARNING_CONFIG_FAILED;
}
- aggregate = rn->info;
+ aggregate = bgp_aggregate_get_node_info(rn);
bgp_aggregate_delete(bgp, &p, afi, safi, aggregate);
bgp_aggregate_install(bgp, afi, safi, &p, 0, NULL, NULL, 0, aggregate);
/* Unlock aggregate address configuration. */
- rn->info = NULL;
+ bgp_aggregate_set_node_info(rn, NULL);
bgp_aggregate_free(aggregate);
bgp_unlock_node(rn);
bgp_unlock_node(rn);
aggregate->summary_only = summary_only;
aggregate->as_set = as_set;
aggregate->safi = safi;
- rn->info = aggregate;
+ bgp_aggregate_set_node_info(rn, aggregate);
/* Aggregate address insert into BGP routing table. */
bgp_aggregate_route(bgp, &p, NULL, afi, safi, NULL, aggregate);
/* called from terminal list command */
void route_vty_out_tmp(struct vty *vty, struct prefix *p, struct attr *attr,
- safi_t safi, uint8_t use_json, json_object *json_ar)
+ safi_t safi, bool use_json, json_object *json_ar)
{
json_object *json_status = NULL;
json_object *json_net = NULL;
/* dampening route */
static void damp_route_vty_out(struct vty *vty, struct prefix *p,
struct bgp_info *binfo, int display, safi_t safi,
- uint8_t use_json, json_object *json)
+ bool use_json, json_object *json)
{
struct attr *attr;
int len;
/* flap route */
static void flap_route_vty_out(struct vty *vty, struct prefix *p,
struct bgp_info *binfo, int display, safi_t safi,
- uint8_t use_json, json_object *json)
+ bool use_json, json_object *json)
{
struct attr *attr;
struct bgp_damp_info *bdi;
afi_t afi, safi_t safi, enum bgp_show_type type);
static int bgp_show_community(struct vty *vty, struct bgp *bgp,
const char *comstr, int exact, afi_t afi,
- safi_t safi, uint8_t use_json);
+ safi_t safi, bool use_json);
static int bgp_show_table(struct vty *vty, struct bgp *bgp, safi_t safi,
struct bgp_table *table, enum bgp_show_type type,
- void *output_arg, uint8_t use_json, char *rd,
+ void *output_arg, bool use_json, char *rd,
int is_last, unsigned long *output_cum,
unsigned long *total_cum,
unsigned long *json_header_depth)
continue;
}
if (type == bgp_show_type_prefix_longer) {
- struct prefix *p = output_arg;
-
+ p = output_arg;
if (!prefix_match(p, &rn->p))
continue;
}
int bgp_show_table_rd(struct vty *vty, struct bgp *bgp, safi_t safi,
struct bgp_table *table, struct prefix_rd *prd_match,
- enum bgp_show_type type, void *output_arg,
- uint8_t use_json)
+ enum bgp_show_type type, void *output_arg, bool use_json)
{
struct bgp_node *rn, *next;
unsigned long output_cum = 0;
return CMD_SUCCESS;
}
static int bgp_show(struct vty *vty, struct bgp *bgp, afi_t afi, safi_t safi,
- enum bgp_show_type type, void *output_arg, uint8_t use_json)
+ enum bgp_show_type type, void *output_arg, bool use_json)
{
struct bgp_table *table;
unsigned long json_header_depth = 0;
}
static void bgp_show_all_instances_routes_vty(struct vty *vty, afi_t afi,
- safi_t safi, uint8_t use_json)
+ safi_t safi, bool use_json)
{
struct listnode *node, *nnode;
struct bgp *bgp;
int is_first = 1;
+ bool route_output = false;
if (use_json)
vty_out(vty, "{\n");
for (ALL_LIST_ELEMENTS(bm->bgp, node, nnode, bgp)) {
+ route_output = true;
if (use_json) {
if (!is_first)
vty_out(vty, ",\n");
if (use_json)
vty_out(vty, "}\n");
+ else if (!route_output)
+ vty_out(vty, "%% BGP instance not found\n");
}
/* Header of detailed BGP route information */
struct bgp_table *rib, const char *ip_str,
afi_t afi, safi_t safi,
struct prefix_rd *prd, int prefix_check,
- enum bgp_path_type pathtype,
- uint8_t use_json)
+ enum bgp_path_type pathtype, bool use_json)
{
int ret;
int header;
static int bgp_show_route(struct vty *vty, struct bgp *bgp, const char *ip_str,
afi_t afi, safi_t safi, struct prefix_rd *prd,
int prefix_check, enum bgp_path_type pathtype,
- uint8_t use_json)
+ bool use_json)
{
if (!bgp) {
bgp = bgp_get_default();
static int bgp_show_lcommunity(struct vty *vty, struct bgp *bgp, int argc,
struct cmd_token **argv, afi_t afi, safi_t safi,
- uint8_t uj)
+ bool uj)
{
struct lcommunity *lcom;
struct buffer *b;
static int bgp_show_lcommunity_list(struct vty *vty, struct bgp *bgp,
const char *lcom, afi_t afi, safi_t safi,
- uint8_t uj)
+ bool uj)
{
struct community_list *list;
safi = bgp_vty_safi_from_str(argv[idx]->text);
}
- int uj = use_json(argc, argv);
+ bool uj = use_json(argc, argv);
struct bgp *bgp = bgp_lookup_by_name(vrf);
if (bgp == NULL) {
safi = bgp_vty_safi_from_str(argv[idx]->text);
}
- int uj = use_json(argc, argv);
+ bool uj = use_json(argc, argv);
struct bgp *bgp = bgp_lookup_by_name(vrf);
if (bgp == NULL) {
int idx = 0;
bgp_vty_find_and_parse_afi_safi_bgp(vty, argv, argc, &idx, &afi, &safi,
- &bgp);
+ &bgp, false);
if (!idx)
return CMD_WARNING;
int idx = 0;
int idx_community_type = 0;
int exact_match = 0;
+ bool uj = use_json(argc, argv);
+
+ if (uj)
+ argc--;
bgp_vty_find_and_parse_afi_safi_bgp(vty, argv, argc, &idx, &afi, &safi,
- &bgp);
+ &bgp, uj);
if (!idx)
return CMD_WARNING;
- int uj = use_json(argc, argv);
- if (uj)
- argc--;
-
if (argv_find(argv, argc, "cidr-only", &idx))
return bgp_show(vty, bgp, afi, safi, bgp_show_type_cidr_only,
NULL, uj);
char *prefix = NULL;
struct bgp *bgp = NULL;
enum bgp_path_type path_type;
- uint8_t uj = use_json(argc, argv);
+ bool uj = use_json(argc, argv);
int idx = 0;
bgp_vty_find_and_parse_afi_safi_bgp(vty, argv, argc, &idx, &afi, &safi,
- &bgp);
+ &bgp, uj);
if (!idx)
return CMD_WARNING;
int idx = 0;
bgp_vty_find_and_parse_afi_safi_bgp(vty, argv, argc, &idx, &afi, &safi,
- &bgp);
+ &bgp, false);
if (!idx)
return CMD_WARNING;
afi_t afi = AFI_IP;
safi_t safi = SAFI_UNICAST;
struct bgp *bgp = NULL;
-
int idx = 0;
- bgp_vty_find_and_parse_afi_safi_bgp(vty, argv, argc, &idx, &afi, &safi,
- &bgp);
- if (!idx)
- return CMD_WARNING;
+ bool uj = use_json(argc, argv);
- int uj = use_json(argc, argv);
if (uj)
argc--;
+ bgp_vty_find_and_parse_afi_safi_bgp(vty, argv, argc, &idx, &afi, &safi,
+ &bgp, uj);
+ if (!idx)
+ return CMD_WARNING;
+
bgp_show_all_instances_routes_vty(vty, afi, safi, uj);
return CMD_SUCCESS;
}
static int bgp_show_community(struct vty *vty, struct bgp *bgp,
const char *comstr, int exact, afi_t afi,
- safi_t safi, uint8_t use_json)
+ safi_t safi, bool use_json)
{
struct community *com;
int ret = 0;
}
static struct peer *peer_lookup_in_view(struct vty *vty, struct bgp *bgp,
- const char *ip_str, uint8_t use_json)
+ const char *ip_str, bool use_json)
{
int ret;
struct peer *peer;
if (CHECK_FLAG(ri->flags, BGP_INFO_COUNTED)) {
pc->count[PCOUNT_COUNTED]++;
if (CHECK_FLAG(ri->flags, BGP_INFO_UNUSEABLE))
- flog_err(LIB_ERR_DEVELOPMENT,
- "Attempting to count but flags say it is unusable");
+ flog_err(
+ EC_LIB_DEVELOPMENT,
+ "Attempting to count but flags say it is unusable");
} else {
if (!CHECK_FLAG(ri->flags, BGP_INFO_UNUSEABLE))
- flog_err(LIB_ERR_DEVELOPMENT,
- "Not counted but flags say we should");
+ flog_err(
+ EC_LIB_DEVELOPMENT,
+ "Not counted but flags say we should");
}
}
}
}
static int bgp_peer_counts(struct vty *vty, struct peer *peer, afi_t afi,
- safi_t safi, uint8_t use_json)
+ safi_t safi, bool use_json)
{
struct peer_pcounts pcounts = {.peer = peer};
unsigned int i;
struct peer *peer;
int idx = 0;
struct bgp *bgp = NULL;
+ bool uj = use_json(argc, argv);
+
+ if (uj)
+ argc--;
bgp_vty_find_and_parse_afi_safi_bgp(vty, argv, argc, &idx, &afi, &safi,
- &bgp);
+ &bgp, uj);
if (!idx)
return CMD_WARNING;
- int uj = use_json(argc, argv);
- if (uj)
- argc--;
-
argv_find(argv, argc, "neighbors", &idx);
peer = peer_lookup_in_view(vty, bgp, argv[idx + 1]->arg, uj);
if (!peer)
{
int idx_peer = 6;
struct peer *peer;
- uint8_t uj = use_json(argc, argv);
+ bool uj = use_json(argc, argv);
peer = peer_lookup_in_view(vty, NULL, argv[idx_peer]->arg, uj);
if (!peer)
static void show_adj_route(struct vty *vty, struct peer *peer, afi_t afi,
safi_t safi, enum bgp_show_adj_route_type type,
- const char *rmap_name, uint8_t use_json,
+ const char *rmap_name, bool use_json,
json_object *json)
{
struct bgp_table *table;
static int peer_adj_routes(struct vty *vty, struct peer *peer, afi_t afi,
safi_t safi, enum bgp_show_adj_route_type type,
- const char *rmap_name, uint8_t use_json)
+ const char *rmap_name, bool use_json)
{
json_object *json = NULL;
struct bgp *bgp = NULL;
struct peer *peer;
enum bgp_show_adj_route_type type = bgp_show_adj_route_advertised;
-
int idx = 0;
- bgp_vty_find_and_parse_afi_safi_bgp(vty, argv, argc, &idx, &afi, &safi,
- &bgp);
- if (!idx)
- return CMD_WARNING;
-
- int uj = use_json(argc, argv);
+ bool uj = use_json(argc, argv);
if (uj)
argc--;
+ bgp_vty_find_and_parse_afi_safi_bgp(vty, argv, argc, &idx, &afi, &safi,
+ &bgp, uj);
+ if (!idx)
+ return CMD_WARNING;
+
/* neighbors <A.B.C.D|X:X::X:X|WORD> */
argv_find(argv, argc, "neighbors", &idx);
peerstr = argv[++idx]->arg;
argv_find(argv, argc, "neighbors", &idx);
peerstr = argv[++idx]->arg;
- uint8_t uj = use_json(argc, argv);
+ bool uj = use_json(argc, argv);
ret = str2sockunion(peerstr, &su);
if (ret < 0) {
static int bgp_show_neighbor_route(struct vty *vty, struct peer *peer,
afi_t afi, safi_t safi,
- enum bgp_show_type type, uint8_t use_json)
+ enum bgp_show_type type, bool use_json)
{
/* labeled-unicast routes live in the unicast table */
if (safi == SAFI_LABELED_UNICAST)
safi_t safi = SAFI_UNICAST;
struct bgp *bgp = NULL;
int idx = 0;
+ bool uj = use_json(argc, argv);
+
+ if (uj)
+ argc--;
bgp_vty_find_and_parse_afi_safi_bgp(vty, argv, argc, &idx, &afi, &safi,
- &bgp);
+ &bgp, uj);
if (!idx)
return CMD_WARNING;
- return bgp_show(vty, bgp, afi, safi,
- bgp_show_type_detail, NULL, use_json(argc, argv));
+ return bgp_show(vty, bgp, afi, safi, bgp_show_type_detail, NULL, uj);
}
DEFUN (show_ip_bgp_neighbor_routes,
safi_t safi = SAFI_UNICAST;
struct peer *peer;
enum bgp_show_type sh_type = bgp_show_type_neighbor;
-
int idx = 0;
+ bool uj = use_json(argc, argv);
+
+ if (uj)
+ argc--;
bgp_vty_find_and_parse_afi_safi_bgp(vty, argv, argc, &idx, &afi, &safi,
- &bgp);
+ &bgp, uj);
if (!idx)
return CMD_WARNING;
- int uj = use_json(argc, argv);
- if (uj)
- argc--;
-
/* neighbors <A.B.C.D|X:X::X:X|WORD> */
argv_find(argv, argc, "neighbors", &idx);
peerstr = argv[++idx]->arg;
/* Get BGP distance node. */
rn = bgp_node_get(bgp_distance_table[afi][safi], (struct prefix *)&p);
- if (rn->info) {
- bdistance = rn->info;
+ bdistance = bgp_distance_get_node(rn);
+ if (bdistance)
bgp_unlock_node(rn);
- } else {
+ else {
bdistance = bgp_distance_new();
- rn->info = bdistance;
+ bgp_distance_set_node_info(rn, bdistance);
}
/* Set distance value. */
return CMD_WARNING_CONFIG_FAILED;
}
- bdistance = rn->info;
+ bdistance = bgp_distance_get_node(rn);
distance = atoi(distance_str);
if (bdistance->distance != distance) {
sockunion2hostprefix(&peer->su, &q);
rn = bgp_node_match(bgp_distance_table[afi][safi], &q);
if (rn) {
- bdistance = rn->info;
+ bdistance = bgp_distance_get_node(rn);
bgp_unlock_node(rn);
if (bdistance->access_list) {
/* 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;
/* Aggregate-address configuration. */
for (rn = bgp_table_top(bgp->aggregate[afi][safi]); rn;
rn = bgp_route_next(rn)) {
- if ((bgp_aggregate = rn->info) == NULL)
+ bgp_aggregate = bgp_aggregate_get_node_info(rn);
+ if (bgp_aggregate == NULL)
continue;
p = &rn->p;
}
for (rn = bgp_table_top(bgp_distance_table[afi][safi]); rn;
- rn = bgp_route_next(rn))
- if ((bdistance = rn->info) != NULL) {
+ rn = bgp_route_next(rn)) {
+ bdistance = bgp_distance_get_node(rn);
+ if (bdistance != NULL) {
char buf[PREFIX_STRLEN];
vty_out(vty, " distance %d %s %s\n",
bdistance->access_list ? bdistance->access_list
: "");
}
+ }
}
/* Allocate routing table structure and install commands. */