From 0c0b2452bc3c96cf3db09eb8cbf62778a2fd8f6c Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Sun, 11 Dec 2016 18:02:34 +0100 Subject: src: add tcp options set support This adds support for tcp mss mangling: nft add rule filter input tcp option maxseg size 1200 Its also possible to change other tcp option fields, but maxseg is one of the more useful ones to change. Signed-off-by: Florian Westphal Acked-by: Pablo Neira Ayuso --- include/statement.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include/statement.h') diff --git a/include/statement.h b/include/statement.h index 61b5027b..6d8aaa8b 100644 --- a/include/statement.h +++ b/include/statement.h @@ -24,6 +24,14 @@ struct counter_stmt { extern struct stmt *counter_stmt_alloc(const struct location *loc); +struct exthdr_stmt { + struct expr *expr; + struct expr *val; +}; + +extern struct stmt *exthdr_stmt_alloc(const struct location *loc, + struct expr *payload, struct expr *expr); + struct payload_stmt { struct expr *expr; struct expr *val; @@ -220,6 +228,7 @@ struct xt_stmt { * @STMT_QUOTA: quota statement * @STMT_NOTRACK: notrack statement * @STMT_OBJREF: stateful object reference statement + * @STMT_EXTHDR: extension header statement */ enum stmt_types { STMT_INVALID, @@ -244,6 +253,7 @@ enum stmt_types { STMT_QUOTA, STMT_NOTRACK, STMT_OBJREF, + STMT_EXTHDR, }; /** @@ -285,6 +295,7 @@ struct stmt { union { struct expr *expr; + struct exthdr_stmt exthdr; struct flow_stmt flow; struct counter_stmt counter; struct payload_stmt payload; -- cgit v1.2.3