]> git.ipfire.org Git - thirdparty/nftables.git/commit
fib: restore JSON output for relational expressions
authorPablo Neira Ayuso <pablo@netfilter.org>
Tue, 19 Aug 2025 09:23:42 +0000 (11:23 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 20 Aug 2025 12:52:34 +0000 (14:52 +0200)
commitdbb92d3137d9ed684cb450ab3c2aef881a4e6006
tree0f4cff43962355bcc68238df5f84211267336b6b
parentc4b17cf8305108f91d8e63880317a59e8e806c80
fib: restore JSON output for relational expressions

JSON output for the fib expression changed:

-                    "result": "check"
+                    "result": "oif"

This breaks third party JSON parsers, revert this change for relational
expressions only via workaround until there are clear rules on how to
proceed with JSON schema updates.

As for set and map statements, keep this new "check" result type since
it is not possible to peek on rhs in such case to guess if the
NFT_FIB_F_PRESENT flag needs to be set on.

Closes: https://bugzilla.netfilter.org/show_bug.cgi?id=1806
Fixes: f4b646032acf ("fib: allow to check if route exists in maps")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/fib.h
src/fib.c
src/json.c
tests/py/inet/fib.t.json
tests/py/inet/fib.t.json.output
tests/shell/testcases/json/single_flag
tests/shell/testcases/parsing/dumps/large_rule_pipe.json-nft
tests/shell/testcases/transactions/0049huge_0
tests/shell/testcases/transactions/dumps/0049huge_0.json-nft