Move struct nft_payload_set into nf_tables.h. In conjunction with nft_payload_mangle function we can apply the payload changes independent of nft_expr context. Signed-off-by: Boris Sukholitko <boris.sukholitko@xxxxxxxxxxxx> --- include/net/netfilter/nf_tables.h | 10 ++++++++++ net/netfilter/nft_payload.c | 10 ---------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/include/net/netfilter/nf_tables.h b/include/net/netfilter/nf_tables.h index 1b8e305bb54a..b027200caf5b 100644 --- a/include/net/netfilter/nf_tables.h +++ b/include/net/netfilter/nf_tables.h @@ -863,6 +863,16 @@ static inline void nft_set_gc_batch_add(struct nft_set_gc_batch *gcb, gcb->elems[gcb->head.cnt++] = elem; } +struct nft_payload_set { + enum nft_payload_bases base:8; + u8 offset; + u8 len; + u8 sreg; + u8 csum_type; + u8 csum_offset; + u8 csum_flags; +}; + struct nft_expr_ops; /** * struct nft_expr_type - nf_tables expression type diff --git a/net/netfilter/nft_payload.c b/net/netfilter/nft_payload.c index 2a41e7e0b3b7..ed4a65ac68d5 100644 --- a/net/netfilter/nft_payload.c +++ b/net/netfilter/nft_payload.c @@ -788,16 +788,6 @@ static int nft_payload_csum_inet(struct sk_buff *skb, const u32 *src, return 0; } -struct nft_payload_set { - enum nft_payload_bases base:8; - u8 offset; - u8 len; - u8 sreg; - u8 csum_type; - u8 csum_offset; - u8 csum_flags; -}; - static int nft_payload_mangle(const struct nft_payload_set *priv, const struct nft_pktinfo *pkt, const u32 *src) -- 2.32.0
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature