Skip to content

Lower-/mixed-case keywords causing failure #13

@RoUS

Description

@RoUS

It appears that zonefiles that use lowercase class and RR type keywords are causing DNS::Zone.load to choke and throw an exception:

#! /usr/bin/ruby
require('rubygems')
require('dns/zone')

zdata = <<EOT
$ttl 3600
$origin dnszone.example.com.
@               in soa      ns1.example.com. hostmaster.dnszone.example.com. (
                            2012052400  ; serial
                            345600      ; refresh
                            3600        ; retry
                            604800      ; expire
                            3600        ; ttl
)
EOT

DNS::Zone.load(zdata)
=> RuntimeError: Unknown or unsupported RR Type
	from /usr/local/share/gems/gems/dns-zone-0.3.1/lib/dns/zone/rr.rb:56:in `load'
	from /usr/local/share/gems/gems/dns-zone-0.3.1/lib/dns/zone.rb:105:in `block in load'
	from /usr/local/share/gems/gems/dns-zone-0.3.1/lib/dns/zone.rb:91:in `each'
	from /usr/local/share/gems/gems/dns-zone-0.3.1/lib/dns/zone.rb:91:in `load'

There is no requirement that the keywords be uppercase.

I'll see if I can work up a patch for this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions