Skip to content

Commit

Permalink
Aggregation/Refine support for Nokia classic.
Browse files Browse the repository at this point in the history
  • Loading branch information
snar committed Oct 25, 2019
1 parent 60f32f3 commit ad840c4
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 17 deletions.
7 changes: 7 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
0.1.36-pre (2019-10-25):
- minor documentation cleanup: bgpq3 supports much more vendors
than just Cisco and Juniper. Copyright years updated.
- Nokia SR OS "classic" actually supports aggregation and
and more-specific filtering in prefix-lists. Thanks to mfisher128
for reporting.

0.1.35 (2018-11-30):
- initial support for Juniper route-filter-lists (JunOS 16.2+).
- too large (>124bytes) sources list was not handled correctly.
Expand Down
32 changes: 15 additions & 17 deletions bgpq3.c
Original file line number Diff line number Diff line change
Expand Up @@ -433,16 +433,24 @@ main(int argc, char* argv[])
exit(1);
};

if(aggregate && expander.vendor==V_NOKIA) {
sx_report(SX_FATAL, "Sorry, aggregation (-A) is not supported on "
"Nokia classic CLI (-N)\n");
if(aggregate && (expander.vendor==V_NOKIA_MD || expander.vendor==V_NOKIA) &&
expander.generation!=T_PREFIXLIST) {
sx_report(SX_FATAL, "Sorry, aggregation (-A) is not supported with "
"ip-prefix-lists (-E) on Nokia. You can try prefix-lists (-P) "
"instead\n");
exit(1);
};

if(aggregate && expander.vendor==V_NOKIA_MD &&
if(refine && (expander.vendor==V_NOKIA_MD || expander.vendor==V_NOKIA) &&
expander.generation!=T_PREFIXLIST) {
sx_report(SX_FATAL, "Sorry, aggregation (-A) is not supported with "
"match-lists (-E) on Nokia MD-CLI. You can try prefix-lists (-P) "
sx_report(SX_FATAL, "Sorry, more-specifics (-R) is not supported with "
"ip-prefix-lists (-E) on Nokia. You can try prefix-lists (-P) "
"instead\n");
exit(1);
};
if(refineLow && (expander.vendor==V_NOKIA_MD || expander.vendor==V_NOKIA) &&
expander.generation!=T_PREFIXLIST) {
sx_report(SX_FATAL, "Sorry, more-specifics (-r) is not supported with "
"ip-prefix-lists (-E) on Nokia. You can try prefix-lists (-P) "
"instead\n");
exit(1);
};
Expand Down Expand Up @@ -506,16 +514,6 @@ main(int argc, char* argv[])
};
};

if(expander.vendor==V_NOKIA) {
if(refine) {
sx_report(SX_FATAL, "Sorry, more-specific filters (-R %u) "
"not supported on Nokia classic CLI (-N)\n", refine);
} else {
sx_report(SX_FATAL, "Sorry, more-specific filters (-r %u) "
"not supported on Nokia classic CLI (-N)\n", refineLow);
};
};

if(expander.generation<T_PREFIXLIST) {
if(refine) {
sx_report(SX_FATAL, "Sorry, more-specific filter (-R %u) "
Expand Down

0 comments on commit ad840c4

Please sign in to comment.