diff options
| author | Shulhan <ms@kilabit.info> | 2023-08-05 15:21:29 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2023-08-05 15:47:53 +0700 |
| commit | 34d09fcaa210ddd9d8bf8d1754151faeebf4e485 (patch) | |
| tree | 7346e07a168f65f81dd5475816bb1e88119f9a0f /lib/dns/testdata/zone_soa_test.txt | |
| parent | bd2ae82e254e203a021c9907e41b41ec0643ad49 (diff) | |
| download | pakakeh.go-34d09fcaa210ddd9d8bf8d1754151faeebf4e485.tar.xz | |
lib/dns: always initialize the Zone SOA record to default values
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.
Diffstat (limited to 'lib/dns/testdata/zone_soa_test.txt')
| -rw-r--r-- | lib/dns/testdata/zone_soa_test.txt | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/dns/testdata/zone_soa_test.txt b/lib/dns/testdata/zone_soa_test.txt new file mode 100644 index 00000000..355ac40f --- /dev/null +++ b/lib/dns/testdata/zone_soa_test.txt @@ -0,0 +1,11 @@ +<<< NewZone +$ORIGIN test.soa +@ SOA test.soa root 1691222000 86400 3600 0 3600 + +<<< Add_SOA +$ORIGIN test.soa +@ SOA new.soa admin 1691222000 86400 3600 0 3600 + +<<< Remove_SOA +$ORIGIN test.soa +@ SOA test.soa root 1691222000 86400 3600 0 3600 |
