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

Zone files with multiple $ORIGINs produce incorrect labels #11

Open
SamLR opened this issue Dec 23, 2016 · 1 comment · May be fixed by #12
Open

Zone files with multiple $ORIGINs produce incorrect labels #11

SamLR opened this issue Dec 23, 2016 · 1 comment · May be fixed by #12

Comments

@SamLR
Copy link

SamLR commented Dec 23, 2016

Zone files with more than one $ORIGIN will produce incorrect (repeating) labels for records with later $ORIGINs that don't explicitly set their name to either '@' or some other name.

For example:

$ORIGIN example.com.
@   3600    SOA     ns1.example.com. (
                        hostmaster.example.com.
                        42
                        3600
                        600
                        86400
                        300
                        )

$ORIGIN sub.example.com.
@   3600    CNAME   sub2.example.com.
    3600    MX      10 mail.example.com.

will produce:

> zone = DNS::Zone::load(File.read('test.zone'))
> zone.records.each{ |r| puts r.label }
  @
  sub
  sub.sub

where the third label should be 'sub'.

@SamLR SamLR linked a pull request Feb 3, 2017 that will close this issue
@hron84
Copy link

hron84 commented Oct 13, 2021

My example is bit more weird:

$ORIGIN domain.com.
test A 1.2.3.4

results the record will be test.domaincom. Which is pretty not what I need.

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

Successfully merging a pull request may close this issue.

2 participants