Repository navigation
Read a number at the start of a line as its owner - #198
Merged
Merged
Conversation
RFC 1035 §5.1 has a line that does not start with a blank start with its
owner. The parser took a first field that reads as a TTL for a TTL at the
owner of the record before it, unless the line only read with it as the
owner. So a reverse zone written by hand,
$ORIGIN 2.0.192.in-addr.arpa.
1 IN PTR one.example.
2 IN PTR two.example.
had both PTRs at 2.0.192.in-addr.arpa., with TTLs of 1 and 2. BIND reads
the owners 1 and 2.
A line that starts with a blank still takes its number for a TTL, and a
class or a type first still leaves the owner before it.
A line that starts with a blank has no owner (RFC 1035 §5.1), so a first field that reads as a TTL is never one. The check took only lowercase units, as the old lexer did, so " 1H 3600 IN A ..." took 1H for the owner, the line reading no other way, where " 1 3600 IN A ..." was refused. It now tells a TTL as the parser reads one, in either case. The changelog line now says only what changed: a class or a type first still leaves the owner before it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
RFC 1035 §5.1 has a line that does not start with a blank start with its owner.
dns_zonetook a first field that reads as a TTL for a TTL at the previous record's owner, unless the line only read with it as the owner. So a reverse zone written by hand lost its owners without an error:BIND reads the owners
1and2, and so doesdns_zonenow. Only lines that start with no blank change:1 IN PTR host., indented, is still a TTL of 1 at the previous owner, as RFC 1035 has it.IN A 192.0.2.1at the start of a line, still leaves the previous owner, as before.This goes into 6.0 because it changes what an existing zone file means: a line that starts with
3600 IN A ...at column 0 meant "the previous owner, TTL 3600" and now has the owner3600, as in BIND. #180 had partly fixed this for 6.0, so1 3600 IN PTR ...read back, and its changelog line is folded into this one under Changed. Four tests asserted the old reading and now assert the new one. The new assertions fail with the fix reverted, and the indented-line case fails if a number is taken for an owner there too. No zone fixture here or in erldns starts a line with a number.