Commit f806da35 authored by Vladimír Čunát's avatar Vladimír Čunát

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
parent 487f2109
Pipeline #40980 failed with stages
in 41 minutes and 43 seconds
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)
......
......@@ -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).
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment