Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lower-/mixed-case keywords causing failure #13

Open
RoUS opened this issue Sep 1, 2017 · 0 comments
Open

Lower-/mixed-case keywords causing failure #13

RoUS opened this issue Sep 1, 2017 · 0 comments

Comments

@RoUS
Copy link

RoUS commented Sep 1, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant