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

Add filter state IP matcher #37637

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

antoniovleonti
Copy link
Contributor

Commit Message: Add filter state IP matcher
Additional Description:

This cl adds a matcher to the generic filter state matcher which attempts to coerce the specified filter state object into an IP, then matches it against a configured CIDR range. If the IP is in the range, the matcher returns true, otherwise false.

Risk Level: low
Testing: unit tested
Docs Changes: none
Release Notes: changelog updated
Platform Specific Features: none

Copy link

CC @envoyproxy/api-shepherds: Your approval is needed for changes made to (api/envoy/|docs/root/api-docs/).
envoyproxy/api-shepherds assignee is @wbpcode
CC @envoyproxy/api-watchers: FYI only for changes made to (api/envoy/|docs/root/api-docs/).

🐱

Caused by: #37637 was opened by antoniovleonti.

see: more, trace.

@antoniovleonti
Copy link
Contributor Author

/assign @markdroth

@antoniovleonti
Copy link
Contributor Author

/retest

Signed-off-by: antoniovleonti <[email protected]>
Copy link
Member

@wbpcode wbpcode left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution. And a comment to API to start this work.

Comment on lines +31 to +32
// Matchers the filter state object as a ip Instance.
xds.core.v3.CidrRange ip_range = 3;
Copy link
Member

Choose a reason for hiding this comment

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

All exist CidrRanges in the envoy api repo now is config.core.v3.CidrRange, please use it for now before we sort out a way to migrate all common protos to xds repo.

And consider to naming it address_match or something. And should repeated be used to allow configuring multiple ranges?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants