Skip to content

Commit 7570e3b

Browse files
roidayangregkh
authored andcommitted
net/sched: act_ct: Fix adding udp port mangle operation
[ Upstream commit 47b5d2a ] Need to use the udp header type and not tcp. Fixes: 9c26ba9 ("net/sched: act_ct: Instantiate flow table entry actions") Signed-off-by: Roi Dayan <[email protected]> Reviewed-by: Paul Blakey <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 9270742 commit 7570e3b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

net/sched/act_ct.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,11 +156,11 @@ tcf_ct_flow_table_add_action_nat_udp(const struct nf_conntrack_tuple *tuple,
156156
__be16 target_dst = target.dst.u.udp.port;
157157

158158
if (target_src != tuple->src.u.udp.port)
159-
tcf_ct_add_mangle_action(action, FLOW_ACT_MANGLE_HDR_TYPE_TCP,
159+
tcf_ct_add_mangle_action(action, FLOW_ACT_MANGLE_HDR_TYPE_UDP,
160160
offsetof(struct udphdr, source),
161161
0xFFFF, be16_to_cpu(target_src));
162162
if (target_dst != tuple->dst.u.udp.port)
163-
tcf_ct_add_mangle_action(action, FLOW_ACT_MANGLE_HDR_TYPE_TCP,
163+
tcf_ct_add_mangle_action(action, FLOW_ACT_MANGLE_HDR_TYPE_UDP,
164164
offsetof(struct udphdr, dest),
165165
0xFFFF, be16_to_cpu(target_dst));
166166
}

0 commit comments

Comments
 (0)