Message ID | 236f51919c3f1a8322a88ec0e9d4e179a70658ce.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=jt6QXj5g; 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 4NBVyr4Snqz20KC for <incoming@patchwork.ozlabs.org>; Wed, 16 Nov 2022 02:51:16 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 041D360E4D; Tue, 15 Nov 2022 15:51:13 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 041D360E4D 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=jt6QXj5g 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 Kdtpu1iwiiGO; Tue, 15 Nov 2022 15:51:11 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp3.osuosl.org (Postfix) with ESMTPS id 86D1860E64; Tue, 15 Nov 2022 15:51:09 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 86D1860E64 Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 5E243C0080; Tue, 15 Nov 2022 15:51:08 +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 08E7BC0033 for <dev@openvswitch.org>; Tue, 15 Nov 2022 15:51:04 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id B7029403C1 for <dev@openvswitch.org>; Tue, 15 Nov 2022 15:51:03 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org B7029403C1 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=jt6QXj5g 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 7QenT8JWrCVH for <dev@openvswitch.org>; Tue, 15 Nov 2022 15:51:03 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org E0A2840984 Received: from mail-qk1-x736.google.com (mail-qk1-x736.google.com [IPv6:2607:f8b0:4864:20::736]) by smtp4.osuosl.org (Postfix) with ESMTPS id E0A2840984 for <dev@openvswitch.org>; Tue, 15 Nov 2022 15:51:02 +0000 (UTC) Received: by mail-qk1-x736.google.com with SMTP id x21so9765782qkj.0 for <dev@openvswitch.org>; Tue, 15 Nov 2022 07:51:02 -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=0/dJp6pSaSk5bNOXFhDmrwekhhFvo9MHRRYBq5+AfmM=; b=jt6QXj5gwR3opj8iee51o11UD97ecuRcHdt1YVE15Jpx160A3ZSASTH6NrMfkkFn3p kj/N9ZWBQJZdQAPuFBnGVfY2/v3lxE8XwSdzdRzAN57eAetqjGyoKqIu0vBjI5AWTbsT onUfX160n2vGu1QfJ+gBRZCPNq/a9kmhIjW9L+LOXkJuZNWF2c4MN+Q/Da2/o1MzGMax djJLnr80TdPYDLs0VcWfXRYm84y00YyLEB3rD6N3PsxNd4dMjFCbCtxf3n6GTyxJYvuW J36F+O8L2eSBQD/7SbZD4OjxSXBmY0eSn014H3ssubqIQSGMkwqSglEYELhCetI/I0bb WMrw== 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=0/dJp6pSaSk5bNOXFhDmrwekhhFvo9MHRRYBq5+AfmM=; b=A/NztwWvw3bQtxyYvIIHrzS44ZWgFI1JePEfxOg+8u8ov2BYC9YjVGmFEAab6yAfE1 4dXQtqnIbNKQTGk8TDzxglHe078YYJDd2r77TmKkIL5GwBOtPC9tVxxOvlRyXWXc6yW8 CZwDN8UZd/s2IgNCGQUDELfVYfY4SgY4wMtsBXMw4BfpOvVcxNlsYDN/279ydbos723n hAeo10w09OjTmoIp4r+AH+bYUMhZa0Pc6V1eOWxnL61jX1tvT/CY5QKixv7ras0XYIYZ rcQt5ef5YXdygIwLITWeAriDHXlKtgxRkr/Qqj60AXSmPhCMx7FNSm23q56htPRxO0LM 8xSg== X-Gm-Message-State: ANoB5pl+IuoJDLbKO8LtUhDAZyOtHSYSOBOpipeqzaxMOwJhywI/C8eu Jdy8FqtTU6sL9LwS38qb3P4= X-Google-Smtp-Source: AA0mqf6YdHh8yeXMotR7DG+Ykw1OGaZLc/1j79CbtfIR7//DUjUq6QTa2bOZrEW0znhAbcFoTpLCYw== X-Received: by 2002:a05:620a:11a9:b0:6fa:1c1:26de with SMTP id c9-20020a05620a11a900b006fa01c126demr16005941qkk.511.1668527462520; Tue, 15 Nov 2022 07:51:02 -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.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Nov 2022 07:51:02 -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:55 -0500 Message-Id: <236f51919c3f1a8322a88ec0e9d4e179a70658ce.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 3/5] net: sched: return NF_ACCEPT when fails to add nat ext in tcf_ct_act_nat 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 da0b7f665277..8869b3ef6642 100644 --- a/net/sched/act_ct.c +++ b/net/sched/act_ct.c @@ -994,7 +994,7 @@ static int tcf_ct_act_nat(struct sk_buff *skb, /* Add NAT extension if not confirmed yet. */ if (!nf_ct_is_confirmed(ct) && !nf_ct_nat_ext_add(ct)) - return NF_DROP; /* Can't NAT. */ + return NF_ACCEPT; /* Can't NAT. */ if (ctinfo != IP_CT_NEW && (ct->status & IPS_NAT_MASK) && (ctinfo != IP_CT_RELATED || commit)) {
This patch changes to return NF_ACCEPT when fails to add nat ext before doing NAT in tcf_ct_act_nat(), to keep consistent with OVS' processing in ovs_ct_nat(). Signed-off-by: Xin Long <lucien.xin@gmail.com> --- net/sched/act_ct.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)