From 263a9c04bf56a2c06cbfab6e1875d59d5556c55d Mon Sep 17 00:00:00 2001
From: Marek Vavrusa <marek.vavrusa@nic.cz>
Date: Mon, 3 Sep 2012 15:01:36 +0200
Subject: [PATCH] Default zone file, relative to storage.

---
 src/knot/conf/conf.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/knot/conf/conf.c b/src/knot/conf/conf.c
index 5cbbdb7efd..15e14a7328 100644
--- a/src/knot/conf/conf.c
+++ b/src/knot/conf/conf.c
@@ -177,6 +177,11 @@ static int conf_process(conf_t *conf)
 			zone->ixfr_fslimit = conf->ixfr_fslimit;
 		}
 		
+		// Default zone file
+		if (zone->file == NULL) {
+			zone->file = strcdup(conf->name, ".zone");
+		}
+		
 		// Relative zone filenames should be relative to storage
 		if (zone->file[0] != '/') {
 			size_t prefix_len = strlen(conf->storage) + 1; // + '\0'
-- 
GitLab