summaryrefslogtreecommitdiffstats
path: root/src/netlink_linearize.c
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2020-10-06 23:16:32 +0200
committerFlorian Westphal <fw@strlen.de>2020-10-15 15:22:05 +0200
commit09a3b2ba0c8228d1c6bf0f030cae97addb397351 (patch)
tree4001441996dd06c5b820fabcc31f7ecaa9ba2443 /src/netlink_linearize.c
parentb4775dec9f80b74c522edec8ebb4af5092e0e82b (diff)
proto: add sctp crc32 checksum fixup
Stateless SCTP header mangling doesn't work reliably. This tells the kernel to update the checksum field using the sctp crc32 algorithm. Note that this needs additional kernel support to work. Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'src/netlink_linearize.c')
-rw-r--r--src/netlink_linearize.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/netlink_linearize.c b/src/netlink_linearize.c
index 846df46b..e5f601d4 100644
--- a/src/netlink_linearize.c
+++ b/src/netlink_linearize.c
@@ -974,7 +974,7 @@ static void netlink_gen_payload_stmt(struct netlink_linearize_ctx *ctx,
expr->len / BITS_PER_BYTE);
if (csum_off) {
nftnl_expr_set_u32(nle, NFTNL_EXPR_PAYLOAD_CSUM_TYPE,
- NFT_PAYLOAD_CSUM_INET);
+ desc->checksum_type);
nftnl_expr_set_u32(nle, NFTNL_EXPR_PAYLOAD_CSUM_OFFSET,
csum_off / BITS_PER_BYTE);
}