From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: passt.top; dkim=pass (2048-bit key; secure) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.a=rsa-sha256 header.s=202408 header.b=HXRm2SfS; dkim-atps=neutral Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id 8DA745A0262 for ; Thu, 29 Aug 2024 03:32:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202408; t=1724895163; bh=DOeQAaqOhkuTTnCIAF9WZZpJVTuF9jpqTbTvrSBpRhc=; h=From:To:Cc:Subject:Date:From; b=HXRm2SfSBbP4GFzjPG47XRvczOzwFcDx2C5vMWdHXrwfXRZ3ouZRW2XaV4hLs223r PKPWpGJKnOVBbt5hErqpi6qyagIpsGCtvl8Ej0hgHCLh4sX/yQoDF2VtaglSY0oB0B NmsHhVrVuQvLfqXTSuJsw8BHTDr3+AeO/DE+RvLmUmszuD/SY8MF1OzJRsERdJo/6S qfvbc0vAjDZ4OM2HtKRhnaFo+y35jMPwyvhbibfU0EKUDPFuF+Bl8fqoBnSQgpLx2w mEERUYL/0lh52Yd+CY5KazictQLBCC0v+8K/7N1uk552EeLOFew6WtoxydCqjbmOWn rizmO0dAFxkHQ== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4WvP0q43xJz4x2J; Thu, 29 Aug 2024 11:32:43 +1000 (AEST) From: David Gibson To: passt-dev@passt.top, Stefano Brivio Subject: [PATCH v2 0/3] Probe host's ephemeral ports, rather than using RFC values Date: Thu, 29 Aug 2024 11:32:39 +1000 Message-ID: <20240829013242.3396770-1-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.46.0 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: 3FN3KE6SEWQ5GO7PVXKDAD4AVINLNX4I X-Message-ID-Hash: 3FN3KE6SEWQ5GO7PVXKDAD4AVINLNX4I X-MailFrom: dgibson@gandalf.ozlabs.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: David Gibson X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: As discussed on our recent call, this implements basing which ports we consider "ephemeral" on probing the host's settings, rather than just assuming the RFC 6335 recommended values, which are not what Linux uses by default. I think this is more correct, but additionally using the Linux values means we consider more ports ephemeral, reducing kernel memory consumption for -t all -u all. Changes in v2: * Add missing close() for the sysctl file David Gibson (3): conf, fwd: Make ephemeral port logic more flexible conf, fwd: Don't attempt to forward port 0 fwd, conf: Probe host's ephemeral ports conf.c | 19 +++++++++++---- fwd.c | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ fwd.h | 3 +++ util.h | 3 --- 4 files changed, 92 insertions(+), 7 deletions(-) -- 2.46.0