dns_one 0.4.11 → 0.4.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dns_one/server.rb +6 -1
- data/lib/dns_one/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8e32371317a91502803f733ed239d95b56f9e80b
|
4
|
+
data.tar.gz: '038dcad02c3b509e54b8c8fe7acb4b24a59dda50'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 022306f22bb4702f4e145cbb593f388b75587f1bd27c9391db9ea544e303a51ba4ee3acc6c49d8a4bddd49befc062b55a4d429839f8d029668049f1aa0c33264
|
7
|
+
data.tar.gz: 0b4fab3ef66e677a6eb41f08945c4d443c2b19282d775356d6d5feba377799b1fb2d41b1e6baf8f9602cf1cad1d2943bf38c67e1f616d87b176b83bd2f8d9215
|
data/lib/dns_one/server.rb
CHANGED
@@ -17,6 +17,11 @@ module DnsOne; class Server # < RExec::Daemon::Base
|
|
17
17
|
|
18
18
|
def run
|
19
19
|
conf = @conf
|
20
|
+
zone_search = ZoneSearch.instance
|
21
|
+
|
22
|
+
# Find a dummy zone to make AR/pg load all dependencies
|
23
|
+
zone_search.query 'dummy.com.br', Resolv::DNS::Resource::IN, '1.2.3.4'
|
24
|
+
|
20
25
|
RubyDNS::run_server(listen: dns_daemon_interfaces, logger: Log.logger) do
|
21
26
|
on(:start) do
|
22
27
|
if RExec.current_user == 'root'
|
@@ -30,7 +35,7 @@ module DnsOne; class Server # < RExec::Daemon::Base
|
|
30
35
|
domain_name = t.question.to_s
|
31
36
|
ip_address = t.options[:peer] rescue nil
|
32
37
|
|
33
|
-
records =
|
38
|
+
records = zone_search.query domain_name, t.resource_class, ip_address
|
34
39
|
|
35
40
|
if records
|
36
41
|
if records.empty?
|
data/lib/dns_one/version.rb
CHANGED