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

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