Message ID | 6d407551f0a1bb96a273299dbc2cd2657c160c82.1668527318.git.lucien.xin@gmail.com |
---|---|
State | Superseded |
Headers | show
Return-Path: <ovs-dev-bounces@openvswitch.org> 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::136; helo=smtp3.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=<UNKNOWN>) 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=LZeJCsri; dkim-atps=neutral Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) (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 4NBVyy5Hxtz20KC for <incoming@patchwork.ozlabs.org>; Wed, 16 Nov 2022 02:51:22 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 902F160E80; Tue, 15 Nov 2022 15:51:13 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 902F160E80 Authentication-Results: smtp3.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=LZeJCsri 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 0lMwjEPVKTss; Tue, 15 Nov 2022 15:51:12 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp3.osuosl.org (Postfix) with ESMTPS id 6E5EE60E4F; Tue, 15 Nov 2022 15:51:11 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 6E5EE60E4F Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 46CBBC0077; Tue, 15 Nov 2022 15:51:10 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 1193FC0071 for <dev@openvswitch.org>; Tue, 15 Nov 2022 15:51:06 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id D2D9741638 for <dev@openvswitch.org>; Tue, 15 Nov 2022 15:51:05 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org D2D9741638 Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=LZeJCsri X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UqXZrxbXs4PN for <dev@openvswitch.org>; Tue, 15 Nov 2022 15:51:05 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org EB71E40984 Received: from mail-qv1-xf29.google.com (mail-qv1-xf29.google.com [IPv6:2607:f8b0:4864:20::f29]) by smtp4.osuosl.org (Postfix) with ESMTPS id EB71E40984 for <dev@openvswitch.org>; Tue, 15 Nov 2022 15:51:04 +0000 (UTC) Received: by mail-qv1-xf29.google.com with SMTP id x13so10041283qvn.6 for <dev@openvswitch.org>; Tue, 15 Nov 2022 07:51:04 -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=ftc4nyJPCQ5yv+ESZ/mwBO5w+pMaoMwclsSo3pRBP2Y=; b=LZeJCsribPeANSan0QrIQkXsX8a85sRH9RttUv/apw8/i3bKAi/BDMLN7FWXZ6v3B2 0d8kpMCBR0GNLt7zWyIOy9UBAxSS2iY6QRnxYUcpnKUbmwJdrKkSTsaANF7bUW97FKgI ZMDlJ3Dz1lGjpk43xxJMrozSSRkxP66VCWy2crmQwrnxB2O8N9wK8tJWBx28idLcXFDU UEvYmeJ/z365uCV8avlQHSSoAj+WAKjL/TkZS/3LXAf0LNywgnTikxxhNBjE0YB15ckQ kDjkrk3qEzRj17fEQBhqsuLHQn5R/GKv/pkrohzffVKVZTkVJ4urN6LK1sw8Qvxwo6Yi Jj3g== 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=ftc4nyJPCQ5yv+ESZ/mwBO5w+pMaoMwclsSo3pRBP2Y=; b=us27WsyczTpAfneuhVoaWeDHNgkTCz3dddPosWBFXmIyZaiiegFXd1ADZ0OQAhcogr z5ErQ5LV4RECSO4YvEysYeaGObjQnY0D87YuUjlxi+H+BdGGylHNXj2wmHgkmEOuIXCB dVE3hgecXdZ3bvt4EITQShsvtppkm4iY8wxW+hVxmj1ap5eY+n0IeQfWCRl9qMz+np0M Wc+5VN6f68aEcPFNmeo4RlUgA0ZUfbxCjggJDxkBU4TMc1p2cLKxQP2+s33w2NbibrO3 VM/PDjF/RzDu7oerilpWhjnCm/D285R12DdPZTuWgJKl3zc80zMasmxR/HCLJJTrXj/a kY4w== X-Gm-Message-State: ANoB5pnlthQenedOgDr6ragvbi7E/1oRVuC8ccUdf1bjVZwNVuAZk3ef 4PYuMiSt7hcQqFz6xMH1bxA= X-Google-Smtp-Source: AA0mqf4F41TxPxZha+8HTIZ0VpHGrvr6vK6P6wwwfHyc3Ye/ieD3L3CGapqz8NZYPhV1qr24BPNHSA== X-Received: by 2002:a0c:fb07:0:b0:4b9:a12:1286 with SMTP id c7-20020a0cfb07000000b004b90a121286mr17256971qvp.50.1668527463678; Tue, 15 Nov 2022 07:51:03 -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 f9-20020a05620a280900b006eeb3165554sm8244351qkp.19.2022.11.15.07.51.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Nov 2022 07:51:03 -0800 (PST) From: Xin Long <lucien.xin@gmail.com> To: network dev <netdev@vger.kernel.org>, dev@openvswitch.org Date: Tue, 15 Nov 2022 10:50:56 -0500 Message-Id: <6d407551f0a1bb96a273299dbc2cd2657c160c82.1668527318.git.lucien.xin@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <cover.1668527318.git.lucien.xin@gmail.com> References: <cover.1668527318.git.lucien.xin@gmail.com> MIME-Version: 1.0 Cc: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>, Jiri Pirko <jiri@resnulli.us>, Davide Caratti <dcaratti@redhat.com>, Florian Westphal <fw@strlen.de>, Jamal Hadi Salim <jhs@mojatatu.com>, Eric Dumazet <edumazet@google.com>, Cong Wang <xiyou.wangcong@gmail.com>, kuba@kernel.org, Paolo Abeni <pabeni@redhat.com>, davem@davemloft.net, Pablo Neira Ayuso <pablo@netfilter.org> Subject: [ovs-dev] [PATCH 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: <ovs-dev.openvswitch.org> List-Unsubscribe: <https://mail.openvswitch.org/mailman/options/ovs-dev>, <mailto:ovs-dev-request@openvswitch.org?subject=unsubscribe> List-Archive: <http://mail.openvswitch.org/pipermail/ovs-dev/> List-Post: <mailto:ovs-dev@openvswitch.org> List-Help: <mailto:ovs-dev-request@openvswitch.org?subject=help> List-Subscribe: <https://mail.openvswitch.org/mailman/listinfo/ovs-dev>, <mailto:ovs-dev-request@openvswitch.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" <ovs-dev-bounces@openvswitch.org> |
Series |
net: eliminate the duplicate code in the ct nat functions of ovs and tc
|
expand
|
diff --git a/net/sched/act_ct.c b/net/sched/act_ct.c index 8869b3ef6642..c7782c9a6ab6 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 */
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. Signed-off-by: Xin Long <lucien.xin@gmail.com> --- net/sched/act_ct.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)