Skip to content

Commit

Permalink
Fix comma display in ingress IOS XR as-path-set printing
Browse files Browse the repository at this point in the history
  • Loading branch information
job committed May 1, 2024
1 parent f44bf47 commit 0a83c75
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion printer.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ bgpq4_print_cisco_aspath(FILE *f, struct bgpq_expander *b)
static void
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;

fprintf(f, "as-path-set %s", b->name);
Expand All @@ -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) {
fprintf(f, "\n ios-regex '^%u(_%u)*$'", res->asn, res->asn);
RB_REMOVE(asn_tree, &b->asnlist, res);
comma = 1;
}

RB_FOREACH(asne, asn_tree, &b->asnlist) {
Expand Down

0 comments on commit 0a83c75

Please sign in to comment.