Dnsruby and OPT records


I’m new to ruby and I’m trying to update a domain with OPT record using
dnsruby. But send_message() returns FORMERR and send_plain_message()
returns REFUSED.

Here’s the code snippet-

msg = Dnsruby::Update::new(“example.com”, “ANY”)
optrr = Dnsruby::RR::OPT.new(2000)
optrr.dnssec_ok = true
msg.do_caching = false

resolver = Dnsruby::Resolver::new({:nameserver => ip.to_s})
resolver.do_caching = false
resolver.dnssec = true
ret = resolver.send_message(msg)

Where am I wrong?


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs