Class: Dyndnsd::Updater::ZoneTransferServerHelper
- Inherits:
-
Async::DNS::Server
- Object
- Async::DNS::Server
- Dyndnsd::Updater::ZoneTransferServerHelper
- Defined in:
- lib/dyndnsd/updater/zone_transfer_server.rb
Instance Attribute Summary collapse
-
#axfr_rrs ⇒ Object
Returns the value of attribute axfr_rrs.
Instance Method Summary collapse
-
#initialize(endpoints, domain) ⇒ ZoneTransferServerHelper
constructor
A new instance of ZoneTransferServerHelper.
-
#process(name, resource_class, transaction) ⇒ void
Since solargraph cannot parse this: param transaction [Async::DNS::Transaction].
Constructor Details
#initialize(endpoints, domain) ⇒ ZoneTransferServerHelper
Returns a new instance of ZoneTransferServerHelper.
135 136 137 138 |
# File 'lib/dyndnsd/updater/zone_transfer_server.rb', line 135 def initialize(endpoints, domain) super(endpoints, logger: Dyndnsd.logger) @domain = domain end |
Instance Attribute Details
#axfr_rrs ⇒ Object
Returns the value of attribute axfr_rrs.
133 134 135 |
# File 'lib/dyndnsd/updater/zone_transfer_server.rb', line 133 def axfr_rrs @axfr_rrs end |
Instance Method Details
#process(name, resource_class, transaction) ⇒ void
This method returns an undefined value.
Since solargraph cannot parse this: param transaction [Async::DNS::Transaction]
144 145 146 147 148 149 150 151 152 153 154 155 |
# File 'lib/dyndnsd/updater/zone_transfer_server.rb', line 144 def process(name, resource_class, transaction) if name != @domain || resource_class != Resolv::DNS::Resource::Generic::Type252_Class1 transaction.fail!(:NXDomain) return end # https://tools.ietf.org/html/rfc5936 transaction.append_question! @axfr_rrs.each do |rr| transaction.add([rr[0]], rr[1]) end end |