-
Notifications
You must be signed in to change notification settings - Fork 229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JunOS: parse and warn on no-prepend-global-as #6711
Conversation
Add missing warnings for related constructs. This is for batfish#6710.
Codecov Report
@@ Coverage Diff @@
## master #6711 +/- ##
============================================
- Coverage 73.67% 73.67% -0.01%
- Complexity 37038 37061 +23
============================================
Files 2942 2943 +1
Lines 148495 148563 +68
Branches 17862 17869 +7
============================================
+ Hits 109406 109452 +46
- Misses 30519 30537 +18
- Partials 8570 8574 +4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 5 of 5 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @corinaminer and @dhalperi)
projects/batfish/src/main/java/org/batfish/grammar/flatjuniper/ConfigurationBuilder.java, line 3842 at r1 (raw file):
@Override public void exitBl_no_prepend_global_as(Bl_no_prepend_global_asContext ctx) { todo(ctx);
I'll double check in a bit but I thought this is what Batfish does by default. If so, we need to warn when something else happens.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @corinaminer and @dhalperi)
projects/batfish/src/main/java/org/batfish/grammar/flatjuniper/ConfigurationBuilder.java, line 3842 at r1 (raw file):
Previously, ratulm wrote…
I'll double check in a bit but I thought this is what Batfish does by default. If so, we need to warn when something else happens.
Judging by the FRR warning behavior (
Line 490 in e2af1bf
// TODO: Handle no-prepend and replace-as. |
no-prepend replace-as
. Per https://docs.frrouting.org/en/latest/bgp.html#clicmd-neighborPEERlocal-asAS-NUMBER[no-prepend][replace-as], this means that (only) local-as will be prepended (not global).
IIUC, JunOS documentation (https://www.juniper.net/documentation/en_US/junos/topics/reference/configuration-statement/local-as-edit-protocols-bgp.html) says that no-prepend-global-as
means that only local-as is prepended.
If I am reading this all right -- no guarantee there -- then we should warn on private/alias options.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 3 of 8 files reviewed, 1 unresolved discussion (waiting on @corinaminer and @ratulm)
projects/batfish/src/main/java/org/batfish/grammar/flatjuniper/ConfigurationBuilder.java, line 3842 at r1 (raw file):
Previously, ratulm wrote…
Judging by the FRR warning behavior (
) which I fixed in consultation with Victor, we implement what in FRR isLine 490 in e2af1bf
// TODO: Handle no-prepend and replace-as. no-prepend replace-as
. Per https://docs.frrouting.org/en/latest/bgp.html#clicmd-neighborPEERlocal-asAS-NUMBER[no-prepend][replace-as], this means that (only) local-as will be prepended (not global).IIUC, JunOS documentation (https://www.juniper.net/documentation/en_US/junos/topics/reference/configuration-statement/local-as-edit-protocols-bgp.html) says that
no-prepend-global-as
means that only local-as is prepended.If I am reading this all right -- no guarantee there -- then we should warn on private/alias options.
TAL.
9e9e916
to
47200c4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 3 of 5 files at r2, 2 of 2 files at r3.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @corinaminer)
Add missing warnings for related constructs.
This is for #6710.