From 1d398465831066c5e98fb2a58d7aa0547595de33 Mon Sep 17 00:00:00 2001 From: Pablo Neira Date: Thu, 24 Nov 2016 12:12:33 +0100 Subject: src: trigger layer 4 checksum when pseudoheader fields are modified This patch sets the NFT_PAYLOAD_L4CSUM_PSEUDOHDR when any of the pseudoheader fields are modified. This implicitly enables stateless NAT, that can be useful under some circuntances. Signed-off-by: Pablo Neira Ayuso --- include/proto.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/proto.h') diff --git a/include/proto.h b/include/proto.h index 4fa54a74..01188ab6 100644 --- a/include/proto.h +++ b/include/proto.h @@ -73,6 +73,7 @@ struct proto_hdr_template { * @length: total size of the header, in bits * @protocols: link to upper layer protocol descriptions indexed by protocol value * @templates: header templates + * @pseudohdr: header fields that are part of upper layer checksum pseudoheader */ struct proto_desc { const char *name; @@ -89,6 +90,7 @@ struct proto_desc { uint8_t order[PROTO_HDRS_MAX]; uint32_t filter; } format; + unsigned int pseudohdr[PROTO_HDRS_MAX]; }; -- cgit v1.2.3