Skip to content
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

fix initial setting of origin type for juniper #363

Merged
merged 6 commits into from
Aug 26, 2017

Conversation

arifogel
Copy link
Member

No description provided.

@arifogel arifogel requested a review from dhalperi August 25, 2017 02:01
Copy link
Member

@dhalperi dhalperi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on variable names, seems correct. Very minor q inline.

For my own edification, can you link me to some context about what we're handling here?

setOriginForNonBgp
.getTrueStatements()
BooleanExpr isNotBgp = new Not(isBgp);
setOriginForNonBgp.setGuard(isNotBgp);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reason for introducing isNotBgp instead of inlining in setGuard?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, could just use falseStatements instead of trueStatements

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For new BGP advertisements, i.e. those created from non-BGP routes, an origin code must be set. Juniper sets it to IGP by default. The code to do that was there, but there were two bugs:

  1. The condition was inverted.
  2. The If statement was never added to the policy.

@dhalperi dhalperi merged commit 0f76978 into master Aug 26, 2017
@dhalperi dhalperi deleted the ari-fix-juniper-origin branch August 26, 2017 01:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants