summaryrefslogtreecommitdiffstats
path: root/netfilter_ppc_fix.patch
diff options
context:
space:
mode:
authorThorsten Leemhuis <fedora@leemhuis.info>2019-12-23 16:22:11 +0100
committerThorsten Leemhuis <fedora@leemhuis.info>2019-12-23 16:22:11 +0100
commit827a551e7f1675a05de9efcac17d61ad534a0833 (patch)
tree9c4da89ff0af602aee1f3312286cbdbc42c9b7d4 /netfilter_ppc_fix.patch
parentf77f68360313531271b013b3b29534343288e24e (diff)
parent869f809aaa03b5475f8a8b9993ce55827e3bdf3f (diff)
downloadkernel-827a551e7f1675a05de9efcac17d61ad534a0833.tar.gz
kernel-827a551e7f1675a05de9efcac17d61ad534a0833.tar.xz
kernel-827a551e7f1675a05de9efcac17d61ad534a0833.zip
Merge remote-tracking branch 'origin/master' into rawhide-user-thl-vanilla-fedora
Diffstat (limited to 'netfilter_ppc_fix.patch')
-rw-r--r--netfilter_ppc_fix.patch69
1 files changed, 0 insertions, 69 deletions
diff --git a/netfilter_ppc_fix.patch b/netfilter_ppc_fix.patch
deleted file mode 100644
index 421f80d41..000000000
--- a/netfilter_ppc_fix.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-From: Pablo Neira Ayuso <pablo () netfilter ! org>
-Date: Sat, 07 Dec 2019 17:38:05 +0000
-To: netfilter-devel
-Subject: Re: [PATCH] netfilter: nf_flow_table_offload: Correct memcpy size for flow_overload_mangle
-
-I'm attaching a tentative patch to address this problem.
-
-Thanks.
-
-diff --git a/net/netfilter/nf_flow_table_offload.c b/net/netfilter/nf_flow_table_offload.c
-index c54c9a6cc981..3d6b2bea9a63 100644
---- a/net/netfilter/nf_flow_table_offload.c
-+++ b/net/netfilter/nf_flow_table_offload.c
-@@ -326,23 +326,23 @@ static void flow_offload_port_snat(struct net *net,
- struct nf_flow_rule *flow_rule)
- {
- struct flow_action_entry *entry = flow_action_entry_next(flow_rule);
-- u32 mask = ~htonl(0xffff0000);
-- __be16 port;
-+ u32 mask = ~htonl(0xffff0000), port;
- u32 offset;
-
- switch (dir) {
- case FLOW_OFFLOAD_DIR_ORIGINAL:
-- port = flow->tuplehash[FLOW_OFFLOAD_DIR_REPLY].tuple.dst_port;
-+ port = ntohs(flow->tuplehash[FLOW_OFFLOAD_DIR_REPLY].tuple.dst_port);
- offset = 0; /* offsetof(struct tcphdr, source); */
- break;
- case FLOW_OFFLOAD_DIR_REPLY:
-- port = flow->tuplehash[FLOW_OFFLOAD_DIR_ORIGINAL].tuple.src_port;
-+ port = ntohs(flow->tuplehash[FLOW_OFFLOAD_DIR_ORIGINAL].tuple.src_port);
- offset = 0; /* offsetof(struct tcphdr, dest); */
- break;
- default:
- break;
- }
-
-+ port = htonl(port << 16);
- flow_offload_mangle(entry, flow_offload_l4proto(flow), offset,
- (u8 *)&port, (u8 *)&mask);
- }
-@@ -353,23 +353,23 @@ static void flow_offload_port_dnat(struct net *net,
- struct nf_flow_rule *flow_rule)
- {
- struct flow_action_entry *entry = flow_action_entry_next(flow_rule);
-- u32 mask = ~htonl(0xffff);
-- __be16 port;
-+ u32 mask = ~htonl(0xffff), port;
- u32 offset;
-
- switch (dir) {
- case FLOW_OFFLOAD_DIR_ORIGINAL:
-- port = flow->tuplehash[FLOW_OFFLOAD_DIR_REPLY].tuple.dst_port;
-+ port = ntohs(flow->tuplehash[FLOW_OFFLOAD_DIR_REPLY].tuple.dst_port);
- offset = 0; /* offsetof(struct tcphdr, source); */
- break;
- case FLOW_OFFLOAD_DIR_REPLY:
-- port = flow->tuplehash[FLOW_OFFLOAD_DIR_ORIGINAL].tuple.src_port;
-+ port = ntohs(flow->tuplehash[FLOW_OFFLOAD_DIR_ORIGINAL].tuple.src_port);
- offset = 0; /* offsetof(struct tcphdr, dest); */
- break;
- default:
- break;
- }
-
-+ port = htonl(port);
- flow_offload_mangle(entry, flow_offload_l4proto(flow), offset,
- (u8 *)&port, (u8 *)&mask);
- }