| Age | Commit message (Collapse) | Author |
|
With help of spdxconv tool [1], we able to bulk update all files license
and copyright format to comply with SPDX formats.
[1] https://kilabit.info/project/spdxconv/
|
|
Previously, the zoneParser store its own origin and TTL, which make it
duplicates and confuse with the zone field that stored and returned by
parser.
To make things simple, use the zone field value as single source of
truth for origin (using zone.Origin) and TTL (using zone.SOA.Minimum).
|
|
One of the property that we seems forget that the Origin actually
must be absolute domain, end with period.
If user does not know this, they may call NewZone or define $ORIGIN
in zone file with relative domain.
|
|
Previously, if we parse, create, or remove the SOA record from zone, we
assume the SOA records are valid and not touch their values.
In this changes, we set the SOA fields to default values if its not set,
to make the SOA record consistent and valid, in perspective of client.
This changes also export the default OS values for documentation and add
new method NewRDataSOA to simplify creating new SOA record.
|
|
Due to refactoring in c376eccd25, parsing SOA record with single line
return an error: "parseSOA: line 2: incomplete SOA statement '0'".
|
|
The change is to accommodate large bytes data, more than 0xFFFF.
The hex address in the first column is increased to 8 digits, the
characters compacted without space in between.
|
|
Even thought the MINFO record not formally obsolete, according to
Wikipedia [1], we still need to support this for backward compatibility.
When packing the resource data length does not include total length.
When parsing, the RMailBox and EmailBox should be added the origin suffix
if its not end with dot.
When saving, the origin should be trimmed from RMailBox and EmailBox.
[1] https://en.wikipedia.org/wiki/List_of_DNS_record_types#Obsolete_record_types
|
|
The rdata for HINFO contains two character-strings: CPU and OS.
Previously, we pack the rdata section sequentially, without adding length
on each of them: <RDLEN><CPU><OS>.
The correct pack format should <RDLEN><LENGTH><CPU><LENGTH><OS>.
|
|
Previous parseSRV start by parsing the _Service from tok, but the
actual value of parameter tok is the Priority.
This changes fix this and as testing we use the example from RFC 2782.
|
|
Previously, the zone only parsing TXT record with double quote since
most of the example that we found during implementation all use double
quote.
This changes allow non-double quoted text in zone file with consequence
that any spaces will terminated the rdata immediately.
Fixes #6
|
|
While at it, fix parsing multiline SOA record where closing parentheses
end on next lines.
Fixes #6
|
|
The ParseZone parse the content of zone from raw bytes.
Now that we have ParseZone, all tests that use zoneParser now can be
replaced using combination of test.Data and ParseZone.
|