modules/hints: change default TTL to 5s, add NEWS

0 was unreasonable.  Even if hints are meant for "close" devices,
they will commonly be e.g. behind WiFi, and it seems unreasonable to
expect changes faster than after a couple seconds anyway.
parent fad65bb6
......@@ -8,6 +8,10 @@ Bugfixes
that were loaded as unmanaged trust anchors (!753)
- trust_anchors.add(): include these TAs in .summary() (!753)
Improvements
------------
- hints module: allow configuring the TTL and change default from 0 to 5s
Knot Resolver 3.2.1 (2019-01-10)
================================
......
......@@ -117,5 +117,4 @@ Properties
:return: the TTL setting
This function allows to read and write the TTL value used for records generated by the hints module.
The default is zero.
......@@ -46,6 +46,7 @@ struct hints_data {
bool use_nodata; /**< See hint_use_nodata() description, exposed via lua. */
uint32_t ttl; /**< TTL used for the hints, exposed via lua. */
};
static const uint32_t HINTS_TTL_DEFAULT = 5;
/** Useful for returning from module properties. */
static char * bool2jsonstr(bool val)
......@@ -638,7 +639,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;
data->ttl = 0;
data->ttl = HINTS_TTL_DEFAULT;
module->data = data;
return kr_ok();
......
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