Blame SOURCES/0002-netlink_linearize-exthdr-op-must-be-u32.patch

fefa46
From d0d83585f7f6a74ac02338a37c6860cd2f26b33b Mon Sep 17 00:00:00 2001
fefa46
From: Phil Sutter <psutter@redhat.com>
fefa46
Date: Thu, 14 Dec 2017 14:18:17 +0100
fefa46
Subject: [PATCH] netlink_linearize: exthdr op must be u32
fefa46
fefa46
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1524246
fefa46
Upstream Status: nftables commit 80f5d7fd66895
fefa46
fefa46
commit 80f5d7fd66895c651c9d1e35b2353f3020ffb538
fefa46
Author: Florian Westphal <fw@strlen.de>
fefa46
Date:   Mon Dec 11 10:06:55 2017 +0100
fefa46
fefa46
    netlink_linearize: exthdr op must be u32
fefa46
fefa46
    libnftnl casts this to u32. Broke exthdr expressions on bigendian.
fefa46
fefa46
    Reported-by: Li Shuang <shuali@redhat.com>
fefa46
    Signed-off-by: Florian Westphal <fw@strlen.de>
fefa46
    Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
fefa46
---
fefa46
 src/netlink_linearize.c | 4 ++--
fefa46
 1 file changed, 2 insertions(+), 2 deletions(-)
fefa46
fefa46
diff --git a/src/netlink_linearize.c b/src/netlink_linearize.c
fefa46
index fb2d250..a268dcc 100644
fefa46
--- a/src/netlink_linearize.c
fefa46
+++ b/src/netlink_linearize.c
fefa46
@@ -178,7 +178,7 @@ static void netlink_gen_exthdr(struct netlink_linearize_ctx *ctx,
fefa46
 	nftnl_expr_set_u32(nle, NFTNL_EXPR_EXTHDR_OFFSET, offset / BITS_PER_BYTE);
fefa46
 	nftnl_expr_set_u32(nle, NFTNL_EXPR_EXTHDR_LEN,
fefa46
 			   div_round_up(expr->len, BITS_PER_BYTE));
fefa46
-	nftnl_expr_set_u8(nle, NFTNL_EXPR_EXTHDR_OP, expr->exthdr.op);
fefa46
+	nftnl_expr_set_u32(nle, NFTNL_EXPR_EXTHDR_OP, expr->exthdr.op);
fefa46
 	nftnl_expr_set_u32(nle, NFTNL_EXPR_EXTHDR_FLAGS, expr->exthdr.flags);
fefa46
 	nftnl_rule_add_expr(ctx->nlr, nle);
fefa46
 }
fefa46
@@ -839,7 +839,7 @@ static void netlink_gen_exthdr_stmt(struct netlink_linearize_ctx *ctx,
fefa46
 	nftnl_expr_set_u32(nle, NFTNL_EXPR_EXTHDR_OFFSET, offset / BITS_PER_BYTE);
fefa46
 	nftnl_expr_set_u32(nle, NFTNL_EXPR_EXTHDR_LEN,
fefa46
 			   div_round_up(expr->len, BITS_PER_BYTE));
fefa46
-	nftnl_expr_set_u8(nle, NFTNL_EXPR_EXTHDR_OP, expr->exthdr.op);
fefa46
+	nftnl_expr_set_u32(nle, NFTNL_EXPR_EXTHDR_OP, expr->exthdr.op);
fefa46
 	nftnl_rule_add_expr(ctx->nlr, nle);
fefa46
 }
fefa46
 
fefa46
-- 
fefa46
1.8.3.1
fefa46