-
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
BGP: set received from IP on import #6501
Conversation
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: 0 of 10 files reviewed, 2 unresolved discussions (waiting on @dhalperi)
projects/batfish/src/main/java/org/batfish/dataplane/protocols/BgpProtocolHelper.java, line 108 at r1 (raw file):
Quoted 14 lines of code…
if (route.getCommunities().getCommunities().contains(StandardCommunity.NO_ADVERTISE)) { return null; } // Do not export route if its AS path contains the remote peer's AS and local peer has not set // getAllowRemoteOut if (sessionProperties.isEbgp() && route.getAsPath().containsAs(sessionProperties.getTailAs()) && !af.getAddressFamilyCapabilities().getAllowRemoteAsOut()) { return null; } // Do not export if route has NO_EXPORT community and this is a true ebgp session if (route.getCommunities().getCommunities().contains(StandardCommunity.NO_EXPORT) && sessionProperties.isEbgp() && sessionProperties.getConfedSessionType() != ConfedSessionType.WITHIN_CONFED) {
revert
projects/batfish/src/main/java/org/batfish/representation/cumulus/CumulusConversions.java, line 822 at r1 (raw file):
boolean nextHopSelfAll = firstNonNull(ipv4af.getNextHopSelfAll(), Boolean.FALSE); if (!nextHopSelfAll) { nextHopSelf = false;
revert
projects/batfish/src/test/java/org/batfish/dataplane/ibdp/BgpNextHopUnchangedTest.java, line 177 at r1 (raw file):
.build() .getName()) .setRouteReflectorClient(!ebgp)
FYI This is the only non-trivial test change. Had to make the middle router a reflector so it actually does reflect routes to the third router in the chain.
Cleaner than trying to set it on export, which we have to get right across lots of different paths. Also resolves issues with IBGP routes sometimes being sent too far. Fix batfish#6490
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 8 of 10 files at r1, 5 of 6 files at r2.
Reviewable status:complete! all files reviewed, all discussions resolved
Codecov Report
@@ Coverage Diff @@
## master #6501 +/- ##
=========================================
Coverage 73.31% 73.31%
- Complexity 35512 35517 +5
=========================================
Files 2824 2824
Lines 143511 143513 +2
Branches 17337 17337
=========================================
+ Hits 105216 105220 +4
- Misses 29960 29961 +1
+ Partials 8335 8332 -3
|
a discussion (no related file): |
Cleaner than trying to set it on export, which we have to get right across lots
of different paths. Also resolves issues with IBGP routes sometimes being sent
too far.
Fix #6490