diff options
author | Vladimír Čunát <vladimir.cunat@nic.cz> | 2023-07-12 16:24:44 +0200 |
---|---|---|
committer | Vladimír Čunát <vladimir.cunat@nic.cz> | 2023-07-12 16:24:44 +0200 |
commit | e07c13f60a1a9f89c485f0f7d200aed287e38133 (patch) | |
tree | c5e76718e6cc23ea22ae0f6e8b1478d55280effa /lib/rules | |
parent | Merge !1423: distro/pkg/rpm: require setuptools on suse (diff) | |
download | knot-resolver-e07c13f60a1a9f89c485f0f7d200aed287e38133.tar.xz knot-resolver-e07c13f60a1a9f89c485f0f7d200aed287e38133.zip |
lib/rules kr_view_insert_action(): fix subnet truncation
The rule DB keys were truncated by one byte.
Unfortunately that often kept them behaving OK so it went unnoticed;
but in particular any /0 views got ignored as a result.
Diffstat (limited to 'lib/rules')
-rw-r--r-- | lib/rules/api.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/rules/api.c b/lib/rules/api.c index 325ed77d..6abc0ac1 100644 --- a/lib/rules/api.c +++ b/lib/rules/api.c @@ -848,6 +848,7 @@ int kr_view_insert_action(const char *subnet, const char *action) { // Write ruleset-specific prefix of the key. const size_t rsp_len = strlen(RULESET_DEFAULT); key.data -= rsp_len; + key.len += rsp_len; memcpy(key.data, RULESET_DEFAULT, rsp_len); } |