summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2018-11-06 16:06:27 +0100
committerFlorian Westphal <fw@strlen.de>2018-11-12 17:41:58 +0100
commitb3c8de9c5aecde38eec964f31120df82b9704c8c (patch)
tree71062c679ad2ab55e36008a09179e54e990e3a59 /include
parentc15c2869168d71d07aca0221e1b37f0c5da54547 (diff)
xt: always build with a minimal support for xt match/target decode
When building without libxtables, nft would just silently omit any presence of nft_compat in the output. This adds ifdef-ry to at least print name of target/match involved when libxtables isn't available for decoding. Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'include')
-rw-r--r--include/xt.h13
1 files changed, 1 insertions, 12 deletions
diff --git a/include/xt.h b/include/xt.h
index 549eb9fe..ab59bb3d 100644
--- a/include/xt.h
+++ b/include/xt.h
@@ -8,7 +8,6 @@ struct rule_pp_ctx;
struct rule;
struct output_ctx;
-#ifdef HAVE_LIBXTABLES
void xt_stmt_xlate(const struct stmt *stmt, struct output_ctx *octx);
void xt_stmt_release(const struct stmt *stmt);
@@ -18,20 +17,10 @@ void netlink_parse_target(struct netlink_parse_ctx *ctx,
void netlink_parse_match(struct netlink_parse_ctx *ctx,
const struct location *loc,
const struct nftnl_expr *nle);
+#ifdef HAVE_LIBXTABLES
void stmt_xt_postprocess(struct rule_pp_ctx *rctx, struct stmt *stmt,
struct rule *rule);
#else
-static inline void xt_stmt_xlate(const struct stmt *stmt, struct output_ctx *octx) {}
-static inline void xt_stmt_release(const struct stmt *stmt) {}
-
-#include <erec.h>
-
-static inline void netlink_parse_target(struct netlink_parse_ctx *ctx,
- const struct location *loc,
- const struct nftnl_expr *nle) {}
-static inline void netlink_parse_match(struct netlink_parse_ctx *ctx,
- const struct location *loc,
- const struct nftnl_expr *nle) {}
static inline void stmt_xt_postprocess(struct rule_pp_ctx *rctx,
struct stmt *stmt, struct rule *rule) {}