mirror of
https://github.com/bgp/bgpq4
synced 2025-02-28 08:53:11 +00:00
Add missing closure in bird aspath output
This commit is contained in:
3
CHANGES
3
CHANGES
@@ -1,3 +1,6 @@
|
||||
1.4 (2021-08-20)
|
||||
- Fix BIRD aspath output
|
||||
|
||||
1.3 (2021-08-20)
|
||||
- Change versioning from X.Y.Z to Y.Z
|
||||
- The repository file hierachy has been reorganized (compat/ include/)
|
||||
|
||||
13
printer.c
13
printer.c
@@ -642,7 +642,6 @@ bgpq4_print_bird_aspath(FILE* f, struct bgpq_expander* b)
|
||||
int nc = 0;
|
||||
struct asn_entry *asne;
|
||||
|
||||
|
||||
fprintf(f, "%s = [", b->name);
|
||||
|
||||
if (RB_EMPTY(&b->asnlist)) {
|
||||
@@ -651,15 +650,21 @@ bgpq4_print_bird_aspath(FILE* f, struct bgpq_expander* b)
|
||||
}
|
||||
|
||||
RB_FOREACH(asne, asn_tree, &b->asnlist) {
|
||||
if (!nc)
|
||||
fprintf(f, "\n %u", asne->asn);
|
||||
else
|
||||
if (!nc) {
|
||||
fprintf(f, "%s\n %u", needscomma ? "," : "",
|
||||
asne->asn);
|
||||
needscomma = 1;
|
||||
} else {
|
||||
fprintf(f, ", %u", asne->asn);
|
||||
needscomma = 1;
|
||||
}
|
||||
|
||||
nc++;
|
||||
if (nc == b->aswidth)
|
||||
nc = 0;
|
||||
}
|
||||
|
||||
fprintf(f, "];\n");
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
Reference in New Issue
Block a user