+ DNS: resolve host names to IP addresses leased by AGH DHCP server

Close #1956

Squashed commit of the following:

commit 21f11632c871e9c17faa77f9cd6a7aa836559779
Author: Simon Zolin <s.zolin@adguard.com>
Date:   Mon Aug 17 19:54:24 2020 +0300

    + DNS: resolve host names to IP addresses leased by AGH DHCP server
This commit is contained in:
Simon Zolin
2020-08-18 12:36:52 +03:00
parent 1e2e965ea7
commit 8d0c8ad438
2 changed files with 67 additions and 1 deletions

View File

@@ -51,6 +51,9 @@ type Server struct {
stats stats.Stats
access *accessCtx
tableHostToIP map[string]net.IP // "hostname -> IP" table for internal addresses (DHCP)
tableHostToIPLock sync.Mutex
tablePTR map[string]string // "IP -> hostname" table for reverse lookup
tablePTRLock sync.Mutex