From: Xin Long Date: Thu, 8 Dec 2022 16:56:11 +0000 (-0500) Subject: net: sched: update the nat flag for icmp error packets in ct_nat_execute X-Git-Tag: v6.6.7~3913^2~25^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0564c3e51bc7bb200e76d0cad2d7067cc77cb83e;p=platform%2Fkernel%2Flinux-starfive.git net: sched: update the nat flag for icmp error packets in ct_nat_execute In ovs_ct_nat_execute(), the packet flow key nat flags are updated when it processes ICMP(v6) error packets translation successfully. In ct_nat_execute() when processing ICMP(v6) error packets translation successfully, it should have done the same in ct_nat_execute() to set post_ct_s/dnat flag, which will be used to update flow key nat flags in OVS module later. Reviewed-by: Saeed Mahameed Signed-off-by: Xin Long Signed-off-by: David S. Miller --- diff --git a/net/sched/act_ct.c b/net/sched/act_ct.c index f6df016..eac4e07 100644 --- a/net/sched/act_ct.c +++ b/net/sched/act_ct.c @@ -937,13 +937,13 @@ static int ct_nat_execute(struct sk_buff *skb, struct nf_conn *ct, } err = nf_nat_packet(ct, ctinfo, hooknum, skb); +out: if (err == NF_ACCEPT) { if (maniptype == NF_NAT_MANIP_SRC) tc_skb_cb(skb)->post_ct_snat = 1; if (maniptype == NF_NAT_MANIP_DST) tc_skb_cb(skb)->post_ct_dnat = 1; } -out: return err; } #endif /* CONFIG_NF_NAT */