mirror of
https://github.com/bgp/bgpq4
synced 2025-02-28 08:53:11 +00:00
Fix comma display in ingress IOS XR as-path-set printing
This commit is contained in:
@@ -89,7 +89,7 @@ bgpq4_print_cisco_aspath(FILE *f, struct bgpq_expander *b)
|
|||||||
static void
|
static void
|
||||||
bgpq4_print_cisco_xr_aspath(FILE *f, struct bgpq_expander *b)
|
bgpq4_print_cisco_xr_aspath(FILE *f, struct bgpq_expander *b)
|
||||||
{
|
{
|
||||||
int nc = 0, comma = 1;
|
int nc = 0, comma = 0;
|
||||||
struct asn_entry *asne, find, *res;
|
struct asn_entry *asne, find, *res;
|
||||||
|
|
||||||
fprintf(f, "as-path-set %s", b->name);
|
fprintf(f, "as-path-set %s", b->name);
|
||||||
@@ -98,6 +98,7 @@ bgpq4_print_cisco_xr_aspath(FILE *f, struct bgpq_expander *b)
|
|||||||
if ((res = RB_FIND(asn_tree, &b->asnlist, &find)) != NULL) {
|
if ((res = RB_FIND(asn_tree, &b->asnlist, &find)) != NULL) {
|
||||||
fprintf(f, "\n ios-regex '^%u(_%u)*$'", res->asn, res->asn);
|
fprintf(f, "\n ios-regex '^%u(_%u)*$'", res->asn, res->asn);
|
||||||
RB_REMOVE(asn_tree, &b->asnlist, res);
|
RB_REMOVE(asn_tree, &b->asnlist, res);
|
||||||
|
comma = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
RB_FOREACH(asne, asn_tree, &b->asnlist) {
|
RB_FOREACH(asne, asn_tree, &b->asnlist) {
|
||||||
|
|||||||
Reference in New Issue
Block a user