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=lP4JSG85; dkim-atps=neutral Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id 02E0F5A061A for ; Sat, 11 Oct 2025 06:49:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202510; t=1760158165; bh=DC5n5O/K0p6BIhASkNSrjFM/aYmvbGwbwU2uKqy+yLo=; h=From:To:Cc:Subject:Date:From; b=lP4JSG85Zmc3UCOcAC+tNOmr3rRWM5mCSTackh5sWJhzvjGhJmLRGlW9bBqlEYjz6 G1ClFOs3pJjP80IIMUbtA0b/6U1iW7uoF2L/+0MoGzTm9t5TEFRTbHZr2tpJWVhWU4 MKlqkLhtRrutQAGpAZ/r6oEuBwhKtLxvZNyvLvSUTDOt2M5X8pmBkVCkTmh4YLmgvj sntpkmCZXrWnmcGx8nliJLBzrRa/ukDPSfWPu/exhzaSi7WU+R1+1l/fkGB488MtRM kVslJRaSL5/P9HV+m8Z193SbEiOojt1rndhchQ+k246cIAaGp9xT5L2Vkuhh/CTe87 WQjZe5U4RShfA== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4ckB3T4hLdz4wBD; Sat, 11 Oct 2025 15:49:25 +1100 (AEDT) From: David Gibson To: passt-dev@passt.top, Stefano Brivio Subject: [PATCH 0/8] RFC: Cleanups to auto port scanning Date: Sat, 11 Oct 2025 15:48:19 +1100 Message-ID: <20251011044827.862757-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: 334XNALTMLBQLJESPUQ4LRNQEANF5ZBI X-Message-ID-Hash: 334XNALTMLBQLJESPUQ4LRNQEANF5ZBI 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. 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 | 23 ++++++++++++ util.h | 1 + 10 files changed, 129 insertions(+), 91 deletions(-) -- 2.51.0