From: Vladimír Čunát Date: Thu, 4 Oct 2018 11:37:30 +0000 (+0200) Subject: hints.use_nodata(true) by default X-Git-Tag: v3.1.0~11^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f806da35666d456488749cb6510cdeab6cce0ff1;p=thirdparty%2Fknot-resolver.git hints.use_nodata(true) by default I believe that's what most users want; practical motivation: https://forum.turris.cz/t/kresd-responds-to-hints-with-nxdomain-for-aaaa-requests/8353 --- diff --git a/NEWS b/NEWS index a29c77f8c..875a9cd44 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,10 @@ Knot Resolver 3.x.y (2018-mm-dd) ================================ +Incompatible changes +-------------------- +- hints.use_nodata(true) by default; that's what most users want + Improvements ------------ - cache: handle out-of-space SIGBUS slightly better (#197) diff --git a/modules/hints/README.rst b/modules/hints/README.rst index 91424396f..a42d19ca0 100644 --- a/modules/hints/README.rst +++ b/modules/hints/README.rst @@ -109,5 +109,5 @@ Properties :param bool toggle: true if enabling NODATA synthesis, false if disabling :return: ``{ result: bool }`` - If set to true, NODATA will be synthesised for matching hint name, but mismatching type (e.g. AAAA query when only A hint exists). + If set to true (the default), NODATA will be synthesised for matching hint name, but mismatching type (e.g. AAAA query when only A hint exists). diff --git a/modules/hints/hints.c b/modules/hints/hints.c index 2667bee3c..bad3345a8 100644 --- a/modules/hints/hints.c +++ b/modules/hints/hints.c @@ -40,7 +40,7 @@ struct hints_data { struct kr_zonecut hints; struct kr_zonecut reverse_hints; - bool use_nodata; + bool use_nodata; /**< See hint_use_nodata() description, exposed via lua. */ }; /** Useful for returning from module properties. */ @@ -627,6 +627,7 @@ int hints_init(struct kr_module *module) } kr_zonecut_init(&data->hints, (const uint8_t *)(""), pool); kr_zonecut_init(&data->reverse_hints, (const uint8_t *)(""), pool); + data->use_nodata = true; module->data = data; return kr_ok(); @@ -675,7 +676,7 @@ struct kr_prop *hints_props(void) { &hint_add_hosts, "add_hosts", "Load a file with hosts-like formatting and add contents into hints.", }, { &hint_root, "root", "Replace root hints set (empty value to return current list).", }, { &hint_root_file, "root_file", "Replace root hints set from a zonefile.", }, - { &hint_use_nodata, "use_nodata", "Synthesise NODATA if name matches, but type doesn't.", }, + { &hint_use_nodata, "use_nodata", "Synthesise NODATA if name matches, but type doesn't. True by default.", }, { NULL, NULL, NULL } }; return prop_list;