From patchwork Tue Dec 6 23:31:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xin Long X-Patchwork-Id: 1712967 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::138; helo=smtp1.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=dy8muhU+; dkim-atps=neutral Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4NRcBH3R3Qz23ns for ; Wed, 7 Dec 2022 10:31:35 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 8B61B81F3E; Tue, 6 Dec 2022 23:31:33 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 8B61B81F3E Authentication-Results: smtp1.osuosl.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=dy8muhU+ X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0RH6d2IGcMrV; Tue, 6 Dec 2022 23:31:32 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp1.osuosl.org (Postfix) with ESMTPS id B82B081F26; Tue, 6 Dec 2022 23:31:30 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org B82B081F26 Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id B9521C007C; Tue, 6 Dec 2022 23:31:29 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 431D3C0085 for ; Tue, 6 Dec 2022 23:31:26 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id E76EF60E4C for ; Tue, 6 Dec 2022 23:31:25 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org E76EF60E4C Authentication-Results: smtp3.osuosl.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=dy8muhU+ X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UqImEgfV_QoE for ; Tue, 6 Dec 2022 23:31:25 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 10EA861051 Received: from mail-qk1-x72e.google.com (mail-qk1-x72e.google.com [IPv6:2607:f8b0:4864:20::72e]) by smtp3.osuosl.org (Postfix) with ESMTPS id 10EA861051 for ; Tue, 6 Dec 2022 23:31:24 +0000 (UTC) Received: by mail-qk1-x72e.google.com with SMTP id z17so8830213qki.11 for ; Tue, 06 Dec 2022 15:31:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=BCSUkUl3qtx2Ug0vdO9kQ6Q3WtijYxxWczDbAdumJqo=; b=dy8muhU+bxTzpENQbLD3W/1GFMRViQLHLZYwqzrU0UMTncgGVKdFGKSibU3U5srfgF 0cNfrhOXVYsLWx5M8jwa+AhAyt2kP1gmAxQo7yWEmeGVBTd6GOBrx2RqzznFmNv36cVV YwTFZuFZoEFaMYNKtIkf+UxpoZdnjod+qhbc4P0Qq/ffibT63Z7h0gDKeilDQDi7xa4s h+JL7eXrgQtPwbsbcsdrGKizij9Hyd5qnJ5EMbeD2Ech2bJYu8+zfjJs0roIrm/rcq0n 0NQSkOjI2ovqP0tpt0mU2U2e1CcrFP8bTE+2KOYDaE1WCq272ycoIXX8p5/me85Vvp/L OGrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BCSUkUl3qtx2Ug0vdO9kQ6Q3WtijYxxWczDbAdumJqo=; b=qQFOGlWUoAhrsZr5V26e0mlR1WdaoCZUOVS5LjC1zRr1fLzVfwzufgk9r85l5kkzjk ovKfqwTbVzSqpcc/TA2vmroR6T6H5FLoBSnfgptG39fsHndJQ5d2VGvO0pj0n54yDRBI bBGxdIYMZ/OdLCaoQclw+QmNNQtSd/mMp+idg0KTyQM/LBdJ57DKI7rZWcAjoix9wzQg idQX1RNqWbX/guRH4LlIJGF/2d8Zf3iYW+EPt4VUxC94VPMz2UOgPQF9WsyKsu9M6Rh+ VTgWvpsGlSCcwMc9CvVZW0FjL57HJ7+o+vTfQtV9+Py8LQsc7VO3uoiODxlyVcBxO9Ox TJBQ== X-Gm-Message-State: ANoB5pnf9G97t46eYu343evlm++pw88maQUSrUe0LcuXRbvsnDiIzeZ6 Lrjn2C4+1Zoe3xiB4LA3CXA= X-Google-Smtp-Source: AA0mqf7GyUjfJpUAGWWT3ETtTvQ1+imiBjxZOEGx13Zg2kHgQ5TvGxExpfxC6cXDPwUpU+QDIi1Kdg== X-Received: by 2002:ae9:e892:0:b0:6fe:e5da:6029 with SMTP id a140-20020ae9e892000000b006fee5da6029mr618898qkg.188.1670369483888; Tue, 06 Dec 2022 15:31:23 -0800 (PST) Received: from wsfd-netdev15.ntdv.lab.eng.bos.redhat.com (nat-pool-bos-t.redhat.com. [66.187.233.206]) by smtp.gmail.com with ESMTPSA id i21-20020a05620a405500b006f8665f483fsm16590231qko.85.2022.12.06.15.31.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Dec 2022 15:31:23 -0800 (PST) From: Xin Long To: network dev , dev@openvswitch.org Date: Tue, 6 Dec 2022 18:31:15 -0500 Message-Id: X-Mailer: git-send-email 2.31.1 In-Reply-To: References: MIME-Version: 1.0 Cc: Marcelo Ricardo Leitner , Jiri Pirko , Paul Blakey , Davide Caratti , Florian Westphal , Jamal Hadi Salim , Ilya Maximets , Saeed Mahameed , Eric Dumazet , Cong Wang , kuba@kernel.org, Paolo Abeni , davem@davemloft.net, Pablo Neira Ayuso Subject: [ovs-dev] [PATCHv3 net-next 4/5] net: sched: update the nat flag for icmp error packets in ct_nat_execute X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" 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 --- net/sched/act_ct.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/sched/act_ct.c b/net/sched/act_ct.c index dd5ae7551956..bb87d1e910ea 100644 --- a/net/sched/act_ct.c +++ b/net/sched/act_ct.c @@ -936,13 +936,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 */