From mboxrd@z Thu Jan 1 00:00:00 1970 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 88CE7C433FE for ; Thu, 3 Feb 2022 12:34:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233553AbiBCMeC (ORCPT ); Thu, 3 Feb 2022 07:34:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59424 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230213AbiBCMeB (ORCPT ); Thu, 3 Feb 2022 07:34:01 -0500 Received: from Chamillionaire.breakpoint.cc (Chamillionaire.breakpoint.cc [IPv6:2a0a:51c0:0:12e:520::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A0B5EC061714; Thu, 3 Feb 2022 04:34:01 -0800 (PST) Received: from fw by Chamillionaire.breakpoint.cc with local (Exim 4.92) (envelope-from ) id 1nFbJH-0000Ty-Ia; Thu, 03 Feb 2022 13:33:59 +0100 From: Florian Westphal To: Cc: , Florian Westphal Subject: [PATCH 4.9.y 0/2] netfilter: nat fix soft lockup when most ports are used Date: Thu, 3 Feb 2022 13:32:53 +0100 Message-Id: <20220203123255.18974-1-fw@strlen.de> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org First patch removes old rovers, they are inherently racy and cause packet drops/delays. Second patch avoids iterating entire range of ports: It takes way too long when most tuples are in use. First patch is slightly mangled: nf_nat_proto_udplite.c doesn't exist anymore upstream and nf_nat_proto_common.c needs minor adjustment in context. Florian Westphal (2): netfilter: nat: remove l4 protocol port rovers netfilter: nat: limit port clash resolution attempts include/net/netfilter/nf_nat_l4proto.h | 2 +- net/netfilter/nf_nat_proto_common.c | 36 ++++++++++++++++++-------- net/netfilter/nf_nat_proto_dccp.c | 5 +--- net/netfilter/nf_nat_proto_sctp.c | 5 +--- net/netfilter/nf_nat_proto_tcp.c | 5 +--- net/netfilter/nf_nat_proto_udp.c | 5 +--- net/netfilter/nf_nat_proto_udplite.c | 5 +--- 7 files changed, 31 insertions(+), 32 deletions(-) -- 2.34.1