path: root/include/payload.h
diff options
authorFlorian Westphal <>2017-05-06 22:36:28 +0200
committerFlorian Westphal <>2017-05-08 21:56:05 +0200
commit1b6693788cd6f9d9a69c24d205e93c2e3cf4d7fd (patch)
treef5d6c88b9e22ce2b161c7269840d84b6b7704bf3 /include/payload.h
parentf99ccda252fa2a44d587c771e92896bcda1d7c7e (diff)
netlink_delinearize: don't kill dependencies accross statements
nft currently translates ip protocol tcp meta mark set 1 tcp dport 22 to mark set 0x00000001 tcp dport 22 This is wrong, the latter form is same as mark set 0x00000001 ip protocol tcp tcp dport 22 and thats not correct (original rule sets mark for tcp packets only). We need to clear the dependency stack whenever we see a statement other than stmt_expr, as these will have side effects (counter, payload mangling, logging and the like). Signed-off-by: Florian Westphal <> Acked-by: Pablo Neira Ayuso <>
Diffstat (limited to 'include/payload.h')
1 files changed, 2 insertions, 0 deletions
diff --git a/include/payload.h b/include/payload.h
index a3d23095..8e357aef 100644
--- a/include/payload.h
+++ b/include/payload.h
@@ -35,6 +35,8 @@ struct payload_dep_ctx {
extern bool payload_is_known(const struct expr *expr);
extern bool payload_is_stacked(const struct proto_desc *desc,
const struct expr *expr);
+void payload_dependency_reset(struct payload_dep_ctx *ctx);
extern void payload_dependency_store(struct payload_dep_ctx *ctx,
struct stmt *stmt,
enum proto_bases base);