netfilter: nft_payload: add packet mangling support
Add support for mangling packet payload. Checksum for the specified base header is updated automatically if requested, however no updates for any kind of pseudo headers are supported, meaning no stateless NAT is supported. For checksum updates different checksumming methods can be specified. The currently supported methods are NONE for no checksum updates, and INET for internet type checksums. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:

committed by
Pablo Neira Ayuso

parent
a9ecfbe7fc
commit
7ec3f7b47b
@@ -47,6 +47,15 @@ struct nft_payload {
|
||||
enum nft_registers dreg:8;
|
||||
};
|
||||
|
||||
struct nft_payload_set {
|
||||
enum nft_payload_bases base:8;
|
||||
u8 offset;
|
||||
u8 len;
|
||||
enum nft_registers sreg:8;
|
||||
u8 csum_type;
|
||||
u8 csum_offset;
|
||||
};
|
||||
|
||||
extern const struct nft_expr_ops nft_payload_fast_ops;
|
||||
|
||||
int nft_payload_module_init(void);
|
||||
|
Reference in New Issue
Block a user