From b3c8de9c5aecde38eec964f31120df82b9704c8c Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Tue, 6 Nov 2018 16:06:27 +0100 Subject: 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 --- include/xt.h | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'include') 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 - -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) {} -- cgit v1.2.3