diff options
author | Roi Dayan <roid@nvidia.com> | 2020-10-19 12:02:44 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-10-29 12:07:06 +0300 |
commit | e5b67266fb4863aa229ab64beaebb7f85812cd43 (patch) | |
tree | 32ffb7561d50a0bd4b4577309af0db8fa696a76c | |
parent | f6bb7b012676fa37d40a28c9ea0463ec951a5599 (diff) | |
download | linux-e5b67266fb4863aa229ab64beaebb7f85812cd43.tar.xz |
net/sched: act_ct: Fix adding udp port mangle operation
[ Upstream commit 47b5d2a107396ab05e83a4dfbd30b563ecbc83af ]
Need to use the udp header type and not tcp.
Fixes: 9c26ba9b1f45 ("net/sched: act_ct: Instantiate flow table entry actions")
Signed-off-by: Roi Dayan <roid@nvidia.com>
Reviewed-by: Paul Blakey <paulb@nvidia.com>
Link: https://lore.kernel.org/r/20201019090244.3015186-1-roid@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | net/sched/act_ct.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sched/act_ct.c b/net/sched/act_ct.c index 0eb4722cf7cd..1558126af0d4 100644 --- a/net/sched/act_ct.c +++ b/net/sched/act_ct.c @@ -156,11 +156,11 @@ tcf_ct_flow_table_add_action_nat_udp(const struct nf_conntrack_tuple *tuple, __be16 target_dst = target.dst.u.udp.port; if (target_src != tuple->src.u.udp.port) - tcf_ct_add_mangle_action(action, FLOW_ACT_MANGLE_HDR_TYPE_TCP, + tcf_ct_add_mangle_action(action, FLOW_ACT_MANGLE_HDR_TYPE_UDP, offsetof(struct udphdr, source), 0xFFFF, be16_to_cpu(target_src)); if (target_dst != tuple->dst.u.udp.port) - tcf_ct_add_mangle_action(action, FLOW_ACT_MANGLE_HDR_TYPE_TCP, + tcf_ct_add_mangle_action(action, FLOW_ACT_MANGLE_HDR_TYPE_UDP, offsetof(struct udphdr, dest), 0xFFFF, be16_to_cpu(target_dst)); } |