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 Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id 870E25A0272 for ; Mon, 16 Nov 2026 05:34:43 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202610; t=1794803680; bh=5KnVneqdfd64GYLaNNE1GoiCBoZHS9BAhff4UmGsjMM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=hr/jMAAD7KdD2pOEfI5zG0MKVMzLEEIphINSP6muUyU4ALpKAVMZvEvfR50fXKpKE b7m+FaGVRo+wTP/96ZYw0mo/Y6jd4oE+TOdlnilZIwxD8JbBo3A/8PkxIrJ9QrWcKK IpTE6ljfmgUSSU4YSoM5GZsJNQ+HZCMKC9Sa8ZfKmnyoJToknon4EWtnaokfVd3eEE 8CZfZQq7TXvGm0T+Zi0DFkISnV/x3go+mx93OJJt0Nz5gZPqF9zQwfxjec73KlpIs/ Dox4xvBvelG9pJlfrznLZXmcJdx/NcLkoMCx6DGp5HmBbMR27bTLYI5D1LKiOAe5F6 awILy7hD6KRQQ== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4jSZlN19JXz4wLf; Mon, 16 Nov 2026 15:34:40 +1100 (AEDT) Date: Mon, 16 Nov 2026 14:10:22 +1100 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH] fwd_rule: Restore forwarding of ephemeral ports for -t auto, -u auto Message-ID: References: <20261115224044.1405061-1-sbrivio@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="+B9siwuXjwokxMxz" Content-Disposition: inline In-Reply-To: <20261115224044.1405061-1-sbrivio@redhat.com> Message-ID-Hash: LCVM2BG4QKZWEJ3F3HAYI4HSNGQJIL5V X-Message-ID-Hash: LCVM2BG4QKZWEJ3F3HAYI4HSNGQJIL5V 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, Frajo Haider , Sean McGinnis 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: --+B9siwuXjwokxMxz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Nov 15, 2026 at 11:40:44PM +0100, Stefano Brivio wrote: > From: Frajo Haider >=20 > >From an original patch by Frajo: commit 4e09ddf03443 ("conf: Allow > user-specified auto-scanned port forwarding ranges") made automatic > port forwarding exclude ephemeral ports, consistently with -t all and > -u all, and I thought this should actually be desirable, because those > ports are ephemeral, after all, and no services should be bound to > them. >=20 > On the other hand, services that can already be contacted on some > other port might want to expose additional (ephemeral indeed) ports. > So perhaps we should really expose them. >=20 > Now, Sean reports that this "feature" actually breaks things for the > kind (Kubernetes-in-Docker) project, because Docker relies on the > rootlesskit integration of pasta, which uses automatic port forwarding > instead of explicit configuration. >=20 > So, feature or not (and I'm fairly convinced it's a bug by now), it > causes a regression, so restore the previous behaviour: if ports are > automatically forwarded, don't exclude ephemeral ports. >=20 > Reported-by: Frajo Haider > Reported-by: Sean McGinnis > Link: https://bugs.passt.top/show_bug.cgi?id=3D219 > Link: https://github.com/kubernetes-sigs/kind/issues/4293 > Fixes: 4e09ddf03443 ("conf: Allow user-specified auto-scanned port forwar= ding ranges") > Signed-off-by: Stefano Brivio Note that until this patch is applied, the old behaviour can also be forced with: -t 1024-65535,auto -u 1024-65535,auto > --- > fwd_rule.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) >=20 > diff --git a/fwd_rule.c b/fwd_rule.c > index 312bc60..a1294d6 100644 > --- a/fwd_rule.c > +++ b/fwd_rule.c > @@ -694,7 +694,8 @@ static void fwd_rule_parse_ports(struct fwd_table *fw= d, bool del, uint8_t proto, > =20 > /* Finally handle "all" and exclude only cases */ > if (exclude_only) { > - fwd_port_map_ephemeral(exclude); > + if (!(flags & FWD_SCAN)) > + fwd_port_map_ephemeral(exclude); > =20 > fwd_rule_range_except(fwd, del, proto, addr, ifname, > 1, NUM_PORTS - 1, exclude, > --=20 > 2.43.0 >=20 --=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 --+B9siwuXjwokxMxz Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmr6dBcACgkQzQJF27ox 2Ge8+Q//Ub2B8ZTwVvYuUJQst2z1t5XA6TcqPE4SoorxQPPsLBL49JjZ+w5DlRYS WuFd+GRxXJuNmodlYQ2Etz5i7I6ss7lmOiC0o8JSr6u359Zx7UM0DUKcfYLf+Vw1 +umhZNCdzLocg5D7ZvhMgZJc4sT+26W7GA237sIHpEcj4j89qW7rc4xnFEy3/P3d gtb0TqMXeLefciiXLWP8+AIefJSXC870ry4u6ALQMfwMBmF34XNcGqhWkANTG/ek uxdS1byiUROhZFDn+q30Jq3IdAmU4oOJBCGnNJ8PTDybRFue5116txaW5krsay1w MjWTx34HAnGQpj7z8SZU9UfTaIOcOhNRAPULCEQHXaP+CJjiJE3S8namr7wg0JEz LNv6hlKmZIBGDhtLIMSDkzNEIsoP0HizprFapgX/TzcgIe30hYYmyx5drz2/bJpA tTMYThZMuThAfOn/qKDD16561yFT3Lj9iF51w22FWYvLo49ZqSROftIlADWFz8pP 5lLcHBYJHkeN1LkX/r/Xei+V52GNdZ8b3tpnnafWYpJXsqk1ADej+fvI9mfTqC/p pGel+NvVuBoUDis+65hW9XASCVbIZwSdzUFA2Ah2A1mPi1TlFCEzjexpaobgr+fM s2l9hvfCZ3du6Ojgvj4ew0gI0Y0Y1540mn4JVwb36XLnsgzk5sU= =AI2H -----END PGP SIGNATURE----- --+B9siwuXjwokxMxz--