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=202510 header.b=g1qNSj87; dkim-atps=neutral Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id 23B845A0619 for ; Fri, 31 Oct 2025 05:19:35 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202510; t=1761884372; bh=35GCrqnR7Tvq/a4egXcXbhcP90v9z04QAvRWDjBL5W8=; h=From:To:Cc:Subject:Date:From; b=g1qNSj872YlJVHPrwXHflXScGINYuNJOrOIdnH5KRJayX1WoaiB8BTmBfpyyX1xcK x9Qic53Lnmg9RTjIWRYm2CCE5pjky0WIfgaZUaRtmAJiQ33K9t9YC73LOXthr3mFva TiE/4/B7r/fr6NB3jqSBJGYSlyPf5moGbFT2l9RZ9KI4JryOHwyQrNb7j/kw3U/dpa YgkL0BKlID9R2eYpNajUQiYfwu/YvZjDba0sSAY12rFSJelPzSuxvFbUSjyWDoOCyY 5tlx0xH6FKiBsXvyeitIlIIDBB2qRNp4/rz/hQMqzi1UMGdBQq2+LwUdrm9OSNfIau QZR0YNhfMOHCQ== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4cySRm1Pnwz4xGy; Fri, 31 Oct 2025 15:19:32 +1100 (AEDT) From: David Gibson To: passt-dev@passt.top, Stefano Brivio Subject: [PATCH v2 0/8] Cleanups to auto port scanning Date: Fri, 31 Oct 2025 15:19:22 +1100 Message-ID: <20251031041930.1272259-1-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.51.0 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: HVKSDXHUI6PCLZSA5AZUSF3SPGJDHJBI X-Message-ID-Hash: HVKSDXHUI6PCLZSA5AZUSF3SPGJDHJBI 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: One of the trickiest parts of implementing the improved forwarding table is integrating it properly with automatic forwarding (-t auto etc.). Here are some preliminary cleanups to the automatic port scanning that will make the job a bit easier. v2: * Rename bitmap_andc() to bitmap_and_not() (4/8) * Fixed comment formatting error (4/8) * Updated commit message based on further information from Stefano (7,8/8) * All other patches unchanged, except for trivial rebase fixes David Gibson (8): icmp: Remove vestiges of ICMP timer tcp, udp, fwd: Run all port scanning from a single timer fwd: Consolidate scans (not rebinds) in fwd.c fwd: Move port exclusion handling from procfs_scan_listen() to callers fwd: Share port scanning logic between init and timer cases fwd: Check forwarding mode in fwd_scan_ports_*() rather than caller fwd: Update all port maps before applying exclusions tcp, udp: Don't exclude ports in {tcp,udp}_port_rebind() fwd.c | 107 ++++++++++++++++++++++++++++++++++++++------------------ fwd.h | 7 ++-- icmp.h | 2 -- passt.c | 8 ++--- tcp.c | 34 +++++++++--------- tcp.h | 3 +- udp.c | 31 ++++------------ udp.h | 4 +-- util.c | 24 +++++++++++++ util.h | 2 ++ 10 files changed, 131 insertions(+), 91 deletions(-) -- 2.51.0