From nobody Tue Dec 16 16:37:14 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 219D0C77B78 for ; Sun, 23 Apr 2023 02:38:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230108AbjDWCig (ORCPT ); Sat, 22 Apr 2023 22:38:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45832 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229556AbjDWCie (ORCPT ); Sat, 22 Apr 2023 22:38:34 -0400 X-Greylist: delayed 438 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Sat, 22 Apr 2023 19:38:32 PDT Received: from mail-m2849.qiye.163.com (mail-m2849.qiye.163.com [103.74.28.49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B5F612109; Sat, 22 Apr 2023 19:38:32 -0700 (PDT) Received: from localhost.localdomain (unknown [106.75.220.2]) by mail-m2839.qiye.163.com (Hmail) with ESMTPA id 0E826C028F; Sun, 23 Apr 2023 10:31:04 +0800 (CST) From: Faicker Mo To: faicker.mo@ucloud.cn Cc: Pablo Neira Ayuso , Jozsef Kadlecsik , Florian Westphal , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] netfilter: conntrack: allow insertion clash of gre protocol Date: Sun, 23 Apr 2023 10:29:57 +0800 Message-Id: <20230423022958.1770634-1-faicker.mo@ucloud.cn> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-HM-Spam-Status: e1kfGhgUHx5ZQUhXWQgPGg8OCBgUHx5ZQUlOS1dZFg8aDwILHllBWSg2Ly tZV1koWUFJQjdXWS1ZQUlXWQ8JGhUIEh9ZQVkZHh1MVktOQ0MZTUlJQkoeGFUZERMWGhIXJBQOD1 lXWRgSC1lBWUpLTVVMTlVJSUtVSVlXWRYaDxIVHRRZQVlPS0hVSkhCQk1KVU9VSk9ZBg++ X-HM-Tid: 0a87abf357f88421kuqw0e826c028f X-HM-MType: 1 X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6KzI6Ayo4LjJCPz0RIQJITEwR HTcaCxVVSlVKTUNJSUpMS01OSkNLVTMWGhIXVR0aEhgQHglVFhQ7DhgXFA4fVRgVRVlXWRILWUFZ SktNVUxOVUlJS1VJWVdZCAFZQUlISks3Bg++ Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" NVGRE tunnel is used in the VM-to-VM communications. The VM packets are encapsulated in NVGRE and sent from the host. For NVGRE there are two tuples(outer sip and outer dip) in the host conntrack item. Insertion clashes are more likely to happen if the concurrent connections are sent from the VM. Signed-off-by: Faicker Mo --- net/netfilter/nf_conntrack_proto_gre.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/netfilter/nf_conntrack_proto_gre.c b/net/netfilter/nf_conn= track_proto_gre.c index 728eeb0aea87..ad6f0ca40cd2 100644 --- a/net/netfilter/nf_conntrack_proto_gre.c +++ b/net/netfilter/nf_conntrack_proto_gre.c @@ -296,6 +296,7 @@ void nf_conntrack_gre_init_net(struct net *net) /* protocol helper struct */ const struct nf_conntrack_l4proto nf_conntrack_l4proto_gre =3D { .l4proto =3D IPPROTO_GRE, + .allow_clash =3D true, #ifdef CONFIG_NF_CONNTRACK_PROCFS .print_conntrack =3D gre_print_conntrack, #endif --=20 2.39.1