Packet-Clearing-House / DNSAuth

Go-lang app to aggregate DNS queries to 1 minute buckets and write them to influxdb
MIT License
2 stars 2 forks source link

Customer lookup based on host range and zone match #27

Open unix1 opened 5 years ago

unix1 commented 5 years ago

Overview

This PR implements requested feature in #23. Specifically, it modifies the customer lookup logic with the following:

Implementation

database

MySQL customers.zones table:

application 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.