diff options
author | Phil Sutter <phil@nwl.cc> | 2018-10-24 21:14:37 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2018-10-24 21:20:43 +0200 |
commit | b849b0dfd9f3aecff5617bc60d5852ef36c3d494 (patch) | |
tree | 609019a341ba89449115d86465577495d1bbba32 /doc/libnftables-json.adoc | |
parent | 4e9c475680aff492c34845a958638c1a43906e07 (diff) |
json: Work around segfault when encountering xt stmt
When trying to convert an xt stmt into JSON, print() callback was
called. Though the code in src/xt.c does not respect output_fp,
therefore buffer wasn't filled as expected making libjansson to puke:
| # nft -j list ruleset
| warning: stmt ops xt have no json callback
| nft: json.c:169: stmt_print_json: Assertion `__out' failed.
| Aborted (core dumped)
Avoid this by detecting xt stmt ops and returning a stub.
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'doc/libnftables-json.adoc')
-rw-r--r-- | doc/libnftables-json.adoc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/libnftables-json.adoc b/doc/libnftables-json.adoc index ea5fbe81..414702c7 100644 --- a/doc/libnftables-json.adoc +++ b/doc/libnftables-json.adoc @@ -998,6 +998,13 @@ Assign connection tracking timeout policy. *ct timeout*:: CT timeout reference. +=== XT +[verse] +*{ "xt": null }* + +This represents an xt statement from xtables compat interface. Sadly, at this +point it is not possible to provide any further information about its content. + == EXPRESSIONS Expressions are the building blocks of (most) statements. In their most basic form, they are just immediate values represented as JSON string, integer or |