Skip to content

Commit

Permalink
Remove extraneous space in Arista prefixlist (#124)
Browse files Browse the repository at this point in the history
* Remove extraneous space in Arista prefixlist

When diffing config generated with bgpq4 with config exported from an Arista device, many lines are returned as changed. This is because prefixlist on Arista device use 3 spaces and bgpq4 uses 4 spaces.

* Update eos--4.txt

* Update eos--6.txt
  • Loading branch information
ledeuns authored Feb 21, 2025
1 parent 4cae7d1 commit 20673db
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion printer.c
Original file line number Diff line number Diff line change
Expand Up @@ -1165,7 +1165,7 @@ bgpq4_print_eprefix(struct sx_radix_node *n, void *ff)

sx_prefix_snprintf(n->prefix, prefix, sizeof(prefix));

snprintf(seqno, sizeof(seqno), " seq %i", seq++);
snprintf(seqno, sizeof(seqno), "seq %i", seq++);

if (n->isAggregate) {
if (n->aggregateLow > n->prefix->masklen) {
Expand Down
4 changes: 2 additions & 2 deletions tests/reference/eos--4.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
no ip prefix-list NN
ip prefix-list NN
seq 1 permit 192.31.196.0/24
seq 2 permit 192.175.48.0/24
seq 1 permit 192.31.196.0/24
seq 2 permit 192.175.48.0/24
4 changes: 2 additions & 2 deletions tests/reference/eos--6.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
no ipv6 prefix-list NN
ipv6 prefix-list NN
seq 1 permit 2001:4:112::/48
seq 2 permit 2620:4f:8000::/48
seq 1 permit 2001:4:112::/48
seq 2 permit 2620:4f:8000::/48

0 comments on commit 20673db

Please sign in to comment.