summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2019-04-25 14:59:42 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2019-04-30 14:20:57 +0200
commitbdb0589cd3abd190dc66876d11166dab8d1c91ce (patch)
treec65a3fb8a167d4fadfa4318b235d5583b596f13c /src
parente0130e777ead5e9128b58b7fe8c99e4052cff090 (diff)
parser_json: Fix typo in ct timeout policy parser
Parser expects an object in policy property and json_is_object() returns true if given parameter is an object. The check was inverse by accident. Fixes: c82a26ebf7e9f ("json: Add ct timeout support") Signed-off-by: Phil Sutter <phil@nwl.cc> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src')
-rw-r--r--src/parser_json.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/parser_json.c b/src/parser_json.c
index 53017935..01f34080 100644
--- a/src/parser_json.c
+++ b/src/parser_json.c
@@ -2782,7 +2782,7 @@ static int json_parse_ct_timeout_policy(struct json_ctx *ctx,
if (!json_unpack(root, "{s:o}", "policy", &tmp))
return 0;
- if (json_is_object(tmp)) {
+ if (!json_is_object(tmp)) {
json_error(ctx, "Invalid ct timeout policy.");
return 1;
}