Currently it's impossible to export notrack expr as json, as it lacks snprintf member and triggers segmentation fault. There are no parameters to notrack, so there's nothing to do, but it should be an explicit function that does nothing. Signed-off-by: Ivan Babrou <ivan@xxxxxxxxxxxxxx> --- src/expr_ops.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/expr_ops.c b/src/expr_ops.c index 3538dd6..a2e1dd3 100644 --- a/src/expr_ops.c +++ b/src/expr_ops.c @@ -42,8 +42,16 @@ extern struct expr_ops expr_ops_tunnel; extern struct expr_ops expr_ops_osf; extern struct expr_ops expr_ops_xfrm; +static int +nftnl_expr_notrack_snprintf(char *buf, size_t len, uint32_t type, + uint32_t flags, const struct nftnl_expr *e) +{ + return -1; +} + static struct expr_ops expr_ops_notrack = { .name = "notrack", + .snprintf = nftnl_expr_notrack_snprintf, }; static struct expr_ops *expr_ops[] = { -- 2.22.0