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 TrieAddr mruby library #1038
Conversation
Thank you for the PR. The only concern I have before merging this is how it interacts with IPv6. I do not think it would be necessary to support IPv6 in trie_addr.rb, but I think the code and the doc should be clear on what happens if a v6 address is passed in. |
@kazuho Thank you for your comment.
BTW, where should I add a document about this library? In |
Changed to use hashes internally instead of arrays. Thanks to it,
|
@i110 Thank you for the updates.
SGTM
Let's discuss. Maybe we should create a section dedicated mruby, but I'd like to think more before proceeding. |
@kazuho I added a document in |
@@ -241,4 +241,33 @@ paths: | |||
EOT | |||
?> | |||
|
|||
<h2 id="how-to" class="section-head">How-To</h2> | |||
|
|||
<h3 id="cidr">IP Address Matching Against CIDR list</h3> |
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.
Possibly change the title to "Matching IP Address Blocks?".
Note that CIDR is an abbreviation of Classless Inter-Domain Routing. Are we routing packets?
Thank you for the doc! Left comments in-line. I generally believe that using the phrase CIDR is not the way to go since it's not precise in our context (and since the word is not so common). I have left some suggestions on how they should be changed, but please go though and change those I have missed. |
@kazuho thank you for your comments. I addressed the points you mentioned. |
Thank you for writing this nifty library. |
@kazuho @hirose31 Adds
TrieAddr
module which can handle CIDR based IP address groups.SYNOPSYS:
This library is mainly built for the use-case in
acl
block, but this is actually independent of ACL feature, so we can use this in other handlers or anywhere else.