From 0a83c7598d13e8d13d13f959ae5308536689317e Mon Sep 17 00:00:00 2001 From: Job Snijders Date: Wed, 1 May 2024 12:26:16 +0000 Subject: [PATCH] Fix comma display in ingress IOS XR as-path-set printing --- printer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/printer.c b/printer.c index 7c62ee8..97021d5 100644 --- a/printer.c +++ b/printer.c @@ -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); @@ -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) {