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

Clarify policy-forwarding and routing-policy if no rules are present #1223

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

dplore
Copy link
Member

@dplore dplore commented Nov 14, 2024

Change Scope

  • Clarify policy-forwarding such that if no rules are present, all packets will be matched

@dplore dplore requested a review from a team as a code owner November 14, 2024 18:40
@dplore
Copy link
Member Author

dplore commented Nov 14, 2024

Related to discussion on #1150

@dplore dplore changed the title Clarify that if no rules are present, no packets will be matched. Clarify policy-forwarding if no rules are present Nov 14, 2024
@OpenConfigBot
Copy link

OpenConfigBot commented Nov 14, 2024

No major YANG version changes in commit def87eb

Copy link

@s19nal s19nal left a comment

Choose a reason for hiding this comment

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

LGTM - updated clarification reads well.

@dplore
Copy link
Member Author

dplore commented Nov 26, 2024

We discussed this a second time in the OC Operators meeting on Nov 26, 2024.
It is observed that policy-forwarding and routing-policy should have the same semantics. At the moment, both are ambiguous about the behavior when there are no rules (policy-forwarding) or no conditions (routing-policy) defined.

For routing-policy, vendor native implementations widely support policies which have no 'conditions' matching all packets.

Example native routing policy configuration: https://gist.github.com/dplore/cff9a4c782f68734adaafff8952fc3cb (Kudos to @oscargdd for sharing this investigation)

So I am updating this description to assert that no rules means match all packets.

@dplore dplore changed the title Clarify policy-forwarding if no rules are present Clarify policy-forwarding and routing-policy if no rules are present Nov 26, 2024
Copy link
Contributor

@xuqma xuqma left a comment

Choose a reason for hiding this comment

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

LGTM for BGP routing policies. Thanks Darren.

@dplore
Copy link
Member Author

dplore commented Dec 3, 2024

After a bit more discussion, there was a request to also clarify what happens if there is a routing-policy statement with no condition AND no action, as well as a policy-definition without any statements. These should be treated as errors (grpc error: INVALID_ARGUMENT, netconfig error missing-element).

Note that policy-result is an action. So one may write a valid OC routing-policy which has for example, one statement which as no condition (matching all routes) and a policy-result of ACCEPT_ROUTE.

I will update this pull request accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Waiting for author
Development

Successfully merging this pull request may close these issues.

5 participants