Skip to contentSkip to conversation

net/sched: act_ct: Fix adding udp port mangle operation

PATCH Applied Roi Dayan 2 participants 2 messages Oct 19, 2020 – Oct 20, 2020

Subsystems (3)
lore
Share & tools
lore

Roi Dayan

author
#0 lore raw

PATCH 1/1 net/sched: act_ct: Fix adding udp port mangle operation

Need to use the udp header type and not tcp.

Fixes 9c26ba9b1f45 ("net/sched: act_ct: Instantiate flow table entry actions")
---
 net/sched/act_ct.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
net/sched/act_ct.c +2 -2
index a780afdf570d..0bac241a4123 100644
@@ -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));
 }
Signature · 1 line
2.8.4