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 CIDR support for expr #62

Merged
merged 3 commits into from
Feb 17, 2024
Merged

Add CIDR support for expr #62

merged 3 commits into from
Feb 17, 2024

Conversation

KujouRinka
Copy link
Contributor

I add CIDR support for expr. Here's example:

- name: block cidr
  action: block
  expr: cidr(string(ip.dst), "192.168.0.0/16")

I use Patch to parse CIDR string at expr compile time, for this avoids the use of lock and repeated parsing of the CIDR string.

@tobyxdd tobyxdd self-requested a review February 17, 2024 22:19
@tobyxdd tobyxdd self-assigned this Feb 17, 2024
@tobyxdd tobyxdd added the enhancement New feature or request label Feb 17, 2024
@tobyxdd
Copy link
Collaborator

tobyxdd commented Feb 17, 2024

Much appreciated!

@tobyxdd tobyxdd merged commit ebff430 into apernet:master Feb 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants