From 34d09fcaa210ddd9d8bf8d1754151faeebf4e485 Mon Sep 17 00:00:00 2001 From: Shulhan Date: Sat, 5 Aug 2023 15:21:29 +0700 Subject: 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. --- lib/dns/testdata/zone/with_soa_test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/dns/testdata/zone') diff --git a/lib/dns/testdata/zone/with_soa_test.txt b/lib/dns/testdata/zone/with_soa_test.txt index d63ba4ea..632d4058 100644 --- a/lib/dns/testdata/zone/with_soa_test.txt +++ b/lib/dns/testdata/zone/with_soa_test.txt @@ -7,7 +7,7 @@ b 604800 IN A 192.1.1.1 <<< zone_out.txt $ORIGIN test.dev. -@ SOA test.dev. . 0 0 0 0 0 +@ SOA test.dev. . 1691222000 86400 3600 0 3600 b 604800 IN A 192.1.1.1 <<< message_0.hex -- cgit v1.3-5-g9baa