From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: passt.top; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=jRvs16xP; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by passt.top (Postfix) with ESMTPS id 344495A061E for ; Thu, 13 Nov 2025 23:22:30 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1763072548; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ShA0WWw7dN9dbdRgGTEHL541f6HTBy+O8uZzcsf8lqY=; b=jRvs16xPnpK4bczb8r6p7jBpY1n7wrvhZAFWqKz3NjE+Z+y5N8keaNDOZaNlkGugaDvvAz Dsvmx/l9ikIpsSuVCm0hKxDZoJLKHxzXBljnor84DxaGab64LZRgyNbfQZVMU3WHnW39tl o3BV1NRzprNlEX/sBXkn4G1isI8D4s0= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-683-WJ46KTmbPAO7g8PxWdcF-A-1; Thu, 13 Nov 2025 17:22:27 -0500 X-MC-Unique: WJ46KTmbPAO7g8PxWdcF-A-1 X-Mimecast-MFC-AGG-ID: WJ46KTmbPAO7g8PxWdcF-A_1763072546 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-429cceeeb96so567394f8f.1 for ; Thu, 13 Nov 2025 14:22:27 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763072545; x=1763677345; h=content-transfer-encoding:mime-version:organization:references :in-reply-to:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=i1yZGlFYW68JLB47kxLKgL5U3z+0h2cPDd6MP6n2GJI=; b=sEuysmcAcJFPLVpn72gmE4atH9DKLPUDvmjNHpnOmKSvJiK4WZSxE54XabpCXu3giD hkpijYckIFkOQ0gOCmAMVpbTvAPbL2jzxfVDgxlOpTHVB1p2KDvWuso9XsAqoik5+X8E 9HyDf6qRAnoX/l/4tZR6L/+nouk1taU+/jTXYYyTG61he09mvY1WDFaVKLJr3xWyugHQ HpBgJnRLDFeo2oQV8J+uwSz716UtuPG0zkBcJTY2C4NA1omyrgu/un3uKjzvCqGr0Bmc /+SI6aiHkEEJM5qWili1H5H7mB/ddQPzAe7FW3umjvEipM2sd5zn51k/kW6PaTtXj7Jn yt5Q== X-Gm-Message-State: AOJu0Ywb3B+XCqnGE5KcMdWXQ4fz35IXIdRj33nDxfTKgPGZfnzLhKek IYUGZwjBfMHpPOX0o6tk+3HBZzZo7yLXArHS8cev0Sw4IsNd9zb8aI6VNfW4UiztI/IursaC7og OoVqCasfEXuRHYZJ2ji+f51KfEFpUN2+p5P3+cwxPiOiveO/QS0VXJAbEXi4/YA== X-Gm-Gg: ASbGnctjnyyKTz6b7L1SiS8EU7bYp3ZKS1mJjtgNsRWCzRNAM2YIo17UKqCDxuhLUpU HkJJueUPHQhNyy5YxrWqhKrEe6qrBZRw0SX472bbX05XoGL54VH83gpQ6jLzOlIXOPwxJb//a15 IdZoMGREPlUOaQ2fhlLAMtk5bFm3e444Cv4sLmk3W0Yf4WnfkFoV3Qc1NWEISR4m6Gk/tliKPXt uZko5jnGdByXsSNHOvi1UPrZXvPOaX1ebwvmYjEcC9FMEyw/SNeWZsdivqalqglDTSby1/ofyn3 v0/bNw1BxH0urGIYP/kXBHZpfLH9P46QSN3amTQsFzAZ2su/PBrnIhwA1eDevbZHJxlICwVRRmF pa5Q6zsN7i9/6hNS173NSYzN1D0N5pgFI8mLLAg== X-Received: by 2002:a05:6000:1884:b0:42b:3ee9:4776 with SMTP id ffacd0b85a97d-42b593391c9mr974938f8f.5.1763072545347; Thu, 13 Nov 2025 14:22:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IGN5pMRn6UygddAFIJubfHqq19kkp4qmoe1S6JlSYaa2ASuEbAjIeXLDcjxtJiKaqb3+2VS1A== X-Received: by 2002:a05:6000:1884:b0:42b:3ee9:4776 with SMTP id ffacd0b85a97d-42b593391c9mr974920f8f.5.1763072544825; Thu, 13 Nov 2025 14:22:24 -0800 (PST) Received: from maya.myfinge.rs (ifcgrfdd.trafficplex.cloud. [176.103.220.4]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-42b53f0b8d6sm6432611f8f.28.2025.11.13.14.22.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Nov 2025 14:22:24 -0800 (PST) Date: Thu, 13 Nov 2025 23:22:23 +0100 From: Stefano Brivio To: David Gibson Subject: Re: [PATCH] udp: Use IP_FREEBIND for flow sockets as well as listening sockets Message-ID: <20251113232223.609e7c6f@elisabeth> In-Reply-To: <20251113013413.331446-1-david@gibson.dropbear.id.au> References: <20251113013413.331446-1-david@gibson.dropbear.id.au> Organization: Red Hat X-Mailer: Claws Mail 4.2.0 (GTK 3.24.49; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: pXNMNsDXqVq_Q2vqgV07m-o66AnDTS-OoCKWrNLQUAI_1763072546 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Message-ID-Hash: 7CMZS36G4VD255JMTK6LDGOUOFQXYXNQ X-Message-ID-Hash: 7CMZS36G4VD255JMTK6LDGOUOFQXYXNQ X-MailFrom: sbrivio@redhat.com 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: On Thu, 13 Nov 2025 12:34:13 +1100 David Gibson wrote: > 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 Applied. > --- > 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. >From https://bugs.passt.top/show_bug.cgi?id=3D174#c0: I can't downgrade passt/pasta to an earlier version or test patches in my current setup ...so I guess we'll have to guess... > 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 typ= e, > =09=09freebind =3D c->freebind; > =09=09break; > =09case EPOLL_TYPE_UDP_LISTEN: > -=09=09freebind =3D c->freebind; > -=09=09/* fallthrough */ > =09case EPOLL_TYPE_UDP: > +=09=09freebind =3D c->freebind; > =09=09proto =3D IPPROTO_UDP; > =09=09socktype =3D SOCK_DGRAM | SOCK_NONBLOCK; > =09=09break; --=20 Stefano