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=T6RBV9w+; dkim-atps=neutral Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id 0542F5A0BC3 for ; Fri, 14 Nov 2025 01:47:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202510; t=1763081221; bh=L/rt+FjXFSfOYhgR/1n80mnhUIfkk/nRRkNAohqi3lY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=T6RBV9w+Qfwe407rLPyLdi94HwdsVo905gf67PrAGUODPss3CvxlehQqJSzKiO36n vyxW4dw7tiT9S6BT7zQNCXTy/gLe99+0F9hIwKf0Ca5w+OXpt6B9IIvxAd1YyTIjEA +qsdYD+Vg9pB8rYeNt+4QNf0Ddg2MG0+UPREeSjEsUK973Zqorax7tPCLNu4NvteY3 qCxzk1pMq6JBfMGA3pVDwxN6meNe5xwt4N+l6J9QNv6n9mE8KtvUDSl4KiEGbOvarW uqAoAVNNeNLigdVNTPJ289Giyh/g92cX/Q+3tz+8kDc/AxxkEue2pQ2XURr2C7x2E+ Ly8kLg8AOgvhQ== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4d6z450SKCz4w9q; Fri, 14 Nov 2025 11:47:01 +1100 (AEDT) Date: Fri, 14 Nov 2025 11:46:53 +1100 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH] udp: Use IP_FREEBIND for flow sockets as well as listening sockets Message-ID: References: <20251113013413.331446-1-david@gibson.dropbear.id.au> <20251113232223.609e7c6f@elisabeth> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="fbK5Fi88U4rPqvv5" Content-Disposition: inline In-Reply-To: <20251113232223.609e7c6f@elisabeth> Message-ID-Hash: VQC3WQO2STPWCOBO6F5ZFJCYWOXNWNIX X-Message-ID-Hash: VQC3WQO2STPWCOBO6F5ZFJCYWOXNWNIX 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: --fbK5Fi88U4rPqvv5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Nov 13, 2025 at 11:22:23PM +0100, Stefano Brivio wrote: > On Thu, 13 Nov 2025 12:34:13 +1100 > David Gibson wrote: >=20 > > The --freebind option allows pasta to listen on addresses that aren't > > registered on the host, which has a number of use cases. However, we > > omitted this option for UDP "flow sockets" which are created once a flow > > is started, connect()ed specifically to the peer. Flow sockets are also > > bound, and if the peer has contacted a freebind address, we need > > IP_FREEBIND to do so. > >=20 > > Link: https://bugs.passt.top/show_bug.cgi?id=3D174 > >=20 > > Signed-off-by: David Gibson >=20 > Applied. >=20 > > --- > > util.c | 3 +-- > > 1 file changed, 1 insertion(+), 2 deletions(-) > >=20 > > I'm still waiting on confirmation from the reporter that this actually > > fixes bug 174. However, I'm pretty sure this is _a_ correct fix, > > whether or not it's a complete fix for the issue seen by the reporter. >=20 > >From https://bugs.passt.top/show_bug.cgi?id=3D174#c0: >=20 > I can't downgrade passt/pasta to an earlier version or test patches in > my current setup Ah, missed that. > ...so I guess we'll have to guess... I guess we will. > > diff --git a/util.c b/util.c > > index 44c21a3e..ab23463b 100644 > > --- a/util.c > > +++ b/util.c > > @@ -67,9 +67,8 @@ int sock_l4_sa(const struct ctx *c, enum epoll_type t= ype, > > freebind =3D c->freebind; > > break; > > case EPOLL_TYPE_UDP_LISTEN: > > - freebind =3D c->freebind; > > - /* fallthrough */ > > case EPOLL_TYPE_UDP: > > + freebind =3D c->freebind; > > proto =3D IPPROTO_UDP; > > socktype =3D SOCK_DGRAM | SOCK_NONBLOCK; > > break; >=20 > --=20 > Stefano >=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 --fbK5Fi88U4rPqvv5 Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmkWe/wACgkQzQJF27ox 2Gevxg/+J59bolohnNhZH8qRgkYgruS6Vrob+VyIqc7tSdYl1rTYz/dV84FwrOiv mBQVaT4eQOhgKHMZMP8taYiUxgsQQoCtmuUPqevnepLRY3cRc2WwIzbIDRZPiiG0 tWSwDX/d3RaxzORyg+kCbcArRg5WSccArIY5j4p9cdZgSM2sZrjlzQlqP9QMmr3g oiCsQTEFHGuXKZ3mi/do6iHo9LKUcp099bW/ojj8h6Fjlojf3W60SuKrvXOw43o7 ZyLGCXNz60Q80qmon/H8E2CPnD9ewHkHwj2f5X5YWggw2DOm3TRZ+C5x/qManE0w MWYeF8nYAyvt/RLovXc9OCm5qUcqzRTzNNr0Dyd1T5IkO3W1iOajstDbttlsHNKN gbYS3PoTn/xj8zRNJ+n1nu3IJ7e/mptPRr0ro0FJjSdlfqGlKYT/wDrpTCcdF69h i2Z9pQ0+PCSyFDJmUQ8EZNRaof8/Tyk5JaTVK20fWRZh5oqmCEZ7bIMTUv7gLRi3 KDEzJvrjWDGDHVY5tkgcD/As3EHrVI+6RjorvEkIkYAlZpzA2oQV8Nt2iHCYEU3U JtWMRY2XW2iaWHPGd8jQgrxeXiYtWHt7ZbJLdfGbyoEWxZJ11fzKWorQxTY4tSHV 1DrVy23ygdMmK0vcpttHknq4wS/W0TP3ZJUGWjvkmnA+zc/ZOgQ= =oLIy -----END PGP SIGNATURE----- --fbK5Fi88U4rPqvv5--