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=202602 header.b=BbuQV1PH; dkim-atps=neutral Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id DCF0B5A026E for ; Thu, 09 Apr 2026 02:48:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202602; t=1775695681; bh=bS3Q1K5Bef0gsUdHt85zq2iWxsJp/DjdbyYDOwDRYtw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=BbuQV1PHwsD2OKSLkU8zxnQxgR628Nl/IOheqiqQyxlOfZlOXAJV0OflU5JI467s0 SUfD96bOSBPBBFzI9deqblNQCWj5y+eYP3TCN/EIL3j1cTlthNS+YoNlEBUOnqabXa zj9XY8RcoamMot3xVwbef20VT5MGb1H8QtsTLzYlxB+S3/S5wM08GLi9+2I2RBQ+16 xtAxyXkjqeyMBxXy7BOSNa+3gQRakIkfyKVQ0atvlg0OfUhDTWHGo453zmt9+bptNb KrWGq+K3RUF8R2svh76IzafDELTCojvOHPGwPIhivIwWpNC0Hp32fAxM/6KGsK/Ou1 Z3ArzGsVQkrFA== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4frh9s2S6Tz4wpy; Thu, 09 Apr 2026 10:48:01 +1000 (AEST) Date: Thu, 9 Apr 2026 10:13:26 +1000 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH 13/18] conf: Rework stepping through chunks of port specifiers Message-ID: References: <20260407031630.2457081-1-david@gibson.dropbear.id.au> <20260407031630.2457081-14-david@gibson.dropbear.id.au> <20260408234021.7f35406b@elisabeth> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="AU8/3aR6CNMaOFJE" Content-Disposition: inline In-Reply-To: <20260408234021.7f35406b@elisabeth> Message-ID-Hash: IAILRKQMVAPBVEDC24ZG7HY26ZQVEACL X-Message-ID-Hash: IAILRKQMVAPBVEDC24ZG7HY26ZQVEACL 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: passt-dev@passt.top 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: --AU8/3aR6CNMaOFJE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Apr 08, 2026 at 11:40:22PM +0200, Stefano Brivio wrote: > On Tue, 7 Apr 2026 13:16:25 +1000 > David Gibson wrote: >=20 > > Port specifier strings are made up of ',' separated chunks. Rework the > > logic we use to step through the chunks. > >=20 > > Specifically, maintain a pointer to the end of each chunk as well as the > > start. This is not really used yet, but will be useful in future. > >=20 > > This also has side effect on semantics. Previously an empty specifier = (0 > > chunks) was not accepted. Now it is, and will be treated as an "exclude > > only" spec which excludes only ephemeral ports. >=20 > Not really, because getopt_long() wants an argument for those options > anyway. This allows an *empty* specifier, not a missing one. i.e. $ pasta -t '' -u '' That's a kind of weird thing to do, but it does work after this patch. --=20 David Gibson (he or they) | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you, not the other way | around. http://www.ozlabs.org/~dgibson --AU8/3aR6CNMaOFJE Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmnW7yUACgkQzQJF27ox 2GeKyg/+PbmrdWAxTBfR6mdhaUr1TteRtVsWGT9gEjJcDcTd3oHuM3jYeQIS/AiU 80GCtAzwmD9xXg6BR5JgK8M0qiQiFUmaMd0uOM8p0jMkgtNMpeW1DsGL/gkcpaR6 aljnTiZzPiRW73aGp1qfhJySRhxc54jJfaBk6niMzV56Sit/JIyrcPB5QcAzXtDc MEBgfR+4y6er0n9BxOh/CevdVxXRmUEkR02JQvSLGFKGL9H6or+EN7lOgDOrl88/ 8WziZ9YvTzwj8WPgxt5tRTnyR8md66jhnaRjXyWyquT0z8Q1C1xfe7SSG/GJGpha W11NvYd4s05PmWgskixSsLw6345DYVVCNNLGf8zu9uyCIdg+OAF3uB2Oip+XeEy3 J2Ca586lf3mnXLLS1ENT2z2QbjCV3wKe1oSy9Pmnu2y0xFI+M9U+nnWQ6m/1eOIB ZDU49jyY+tDcglvegfbclG0L2lub6gnO67W+ou/7NYaTBYxQwuU4sCjgB/2L5yyX 8hcUbqsnlPWIWBB7oZAg0Xx1q1nfVbigYI3O8tU033knRXNFix9YIir308kF7cVs H91fdm4Tv5H38+mXtpcf6k3w1wkuGaQetslzX4H81yl5+XYXHmIXVWgqP2nz/5Zj ShgJheiZjG8c30UDIuGrZr0PXqAYdD1BgLTWYr3MVALG0srAwwo= =GIFj -----END PGP SIGNATURE----- --AU8/3aR6CNMaOFJE--