Class: Radd::DNS
- Inherits:
-
Async::DNS::Server
- Object
- Async::DNS::Server
- Radd::DNS
- Defined in:
- lib/radd/dns.rb
Instance Method Summary collapse
-
#initialize ⇒ DNS
constructor
A new instance of DNS.
- #process(name, resource_class, transaction) ⇒ Object
Constructor Details
Instance Method Details
#process(name, resource_class, transaction) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/radd/dns.rb', line 6 def process(name, resource_class, transaction) name = name.downcase if Resolv::DNS::Resource::IN::A == resource_class if Radd.domain == name ip = Radd.ip else ip = Radd.query(name) end end return transaction.respond!(ip, ttl: 300) if ip transaction.fail!(:NXDomain) end |