Customer lookup based on host range and zone match#27
Open
unix1 wants to merge 13 commits intoPacket-Clearing-House:masterfrom
Open
Customer lookup based on host range and zone match#27unix1 wants to merge 13 commits intoPacket-Clearing-House:masterfrom
unix1 wants to merge 13 commits intoPacket-Clearing-House:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR implements requested feature in #23. Specifically, it modifies the customer lookup logic with the following:
Implementation
database
MySQL
customers.zonestable:group_namefield has been renamed tonamehostfield has been removedip_startandip_endbinary fields have been added to store IP rangesapplication logic
The radix tree has been removed and replaced with the newly forked and updated interval tree which stores IP ranges as intervals in memory. The logic has been adjusted to reflect the priority of IP range lookup over the qname prefix match.
Finally, there are few basic tests to validate the customer matching functionality.
Note that due to database schema updates, this change is not backward compatible. Any applications accessing the customers database must be updated to reflect the new schema.