From 09a3b2ba0c8228d1c6bf0f030cae97addb397351 Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Tue, 6 Oct 2020 23:16:32 +0200 Subject: 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 --- src/netlink_linearize.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/netlink_linearize.c') 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); } -- cgit v1.2.3