diff options
author | Vladimír Čunát <vladimir.cunat@nic.cz> | 2023-08-23 11:58:39 +0200 |
---|---|---|
committer | Vladimír Čunát <vladimir.cunat@nic.cz> | 2023-09-12 12:12:55 +0200 |
commit | fffdc6222e08e34eaf29d50eecb6e5c500a1bf78 (patch) | |
tree | b2b76c970fc30f131da67d34a46348cbe7868a9d /modules | |
parent | datamodel: /local-data/subtrees/*: drop parts that are not implemented (diff) | |
download | knot-resolver-fffdc6222e08e34eaf29d50eecb6e5c500a1bf78.tar.xz knot-resolver-fffdc6222e08e34eaf29d50eecb6e5c500a1bf78.zip |
modules/hints,lib/rules: rework TTL defaults
It was a bit wide, with 5s and 3h, and distinction between
these two "groups" of rules was a bit random wrt. TTL choice.
Now: 5m for user's rules and 1h for RFC-default rules.
I found it relatively hard to choose defaults, but at least for
user-supplied rules it's trivial to configure a different default.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/hints/hints.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/modules/hints/hints.c b/modules/hints/hints.c index c422bce0..eaefaae4 100644 --- a/modules/hints/hints.c +++ b/modules/hints/hints.c @@ -33,7 +33,6 @@ 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) @@ -299,7 +298,7 @@ int hints_init(struct kr_module *module) if (!data) return kr_error(ENOMEM); data->use_nodata = true; - data->ttl = HINTS_TTL_DEFAULT; + data->ttl = KR_RULE_TTL_DEFAULT; module->data = data; return kr_ok(); |