summaryrefslogtreecommitdiffstats
path: root/src/utils
diff options
context:
space:
mode:
authorDaniel Salzman <daniel.salzman@nic.cz>2024-07-18 09:16:08 +0200
committerDaniel Salzman <daniel.salzman@nic.cz>2024-07-19 16:53:55 +0200
commit14a7ba8ab3a444ba8ac4436bc75a71a31b836248 (patch)
tree9242d032b0f0893a7d589e04e488251b9cf47012 /src/utils
parentMakefile: fix typo (diff)
downloadknot-14a7ba8ab3a444ba8ac4436bc75a71a31b836248.tar.xz
knot-14a7ba8ab3a444ba8ac4436bc75a71a31b836248.zip
conf: add 'zone.default-ttl` configuration option
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/kzonecheck/main.c4
-rw-r--r--src/utils/kzonecheck/zone_check.c4
-rw-r--r--src/utils/kzonecheck/zone_check.h2
3 files changed, 6 insertions, 4 deletions
diff --git a/src/utils/kzonecheck/main.c b/src/utils/kzonecheck/main.c
index 54f1a506f..e8c5868c4 100644
--- a/src/utils/kzonecheck/main.c
+++ b/src/utils/kzonecheck/main.c
@@ -23,6 +23,7 @@
#include "libknot/libknot.h"
#include "knot/common/log.h"
#include "knot/zone/semantic-check.h"
+#include "knot/zone/zone-load.h"
#include "utils/common/msg.h"
#include "utils/common/params.h"
#include "utils/kzonecheck/zone_check.h"
@@ -169,7 +170,8 @@ int main(int argc, char *argv[])
log_levels_add(LOG_TARGET_STDOUT, LOG_SOURCE_ANY, LOG_UPTO(LOG_DEBUG));
}
- int ret = zone_check(filename, zone, zonemd, optional, (time_t)check_time, print);
+ int ret = zone_check(filename, zone, zonemd, DEFAULT_TTL, optional,
+ (time_t)check_time, print);
log_close();
if (ret == KNOT_EOK) {
if (verbose && !print) {
diff --git a/src/utils/kzonecheck/zone_check.c b/src/utils/kzonecheck/zone_check.c
index 2ea63b8d2..46c8a8e36 100644
--- a/src/utils/kzonecheck/zone_check.c
+++ b/src/utils/kzonecheck/zone_check.c
@@ -64,14 +64,14 @@ static void print_statistics(err_handler_stats_t *stats)
}
int zone_check(const char *zone_file, const knot_dname_t *zone_name, bool zonemd,
- semcheck_optional_t optional, time_t time, bool print)
+ uint32_t dflt_ttl, semcheck_optional_t optional, time_t time, bool print)
{
err_handler_stats_t stats = {
.handler = { .cb = err_callback },
};
zloader_t zl;
- int ret = zonefile_open(&zl, zone_file, zone_name, optional, time);
+ int ret = zonefile_open(&zl, zone_file, zone_name, dflt_ttl, optional, time);
switch (ret) {
case KNOT_EOK:
break;
diff --git a/src/utils/kzonecheck/zone_check.h b/src/utils/kzonecheck/zone_check.h
index 206c27ef1..6a7afdfef 100644
--- a/src/utils/kzonecheck/zone_check.h
+++ b/src/utils/kzonecheck/zone_check.h
@@ -20,4 +20,4 @@
#include "libknot/libknot.h"
int zone_check(const char *zone_file, const knot_dname_t *zone_name, bool zonemd,
- semcheck_optional_t optional, time_t time, bool print);
+ uint32_t dflt_ttl, semcheck_optional_t optional, time_t time, bool print);