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=202512 header.b=K2Lfgc2v; dkim-atps=neutral Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id 5B6EF5A0624 for ; Tue, 13 Jan 2026 04:06:19 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202512; t=1768273576; bh=LirX5O0sOmkWlfxk7AHGPSALG9j2zu/rwUvqLdG1KjI=; h=From:To:Cc:Subject:Date:From; b=K2Lfgc2vd5nzV8p5rh89btnE1pb6dGE6zfXFT2/Mc6EnnMatitd5dPPLKFjFON40j NQA/0jm64/kGBbwPsTW+9q9n9pwbNtJhCrjHl8tLyBsRNpcyFYNS+hD9FCR/ly194U i56ISQkfgUqAE1U7DVNizGZyl5Kl0CX9t7Knao0jfGAOXCkGRcSEspH1aJ6mFcTRvs Ib5wyxWxcOizWDGoa6rS5T3CDHEPdjKJ/pbpzAIq8VStiID1gFjA8fuArxhY+gqsus FLX23Fm+ErCu2JLgZD1QH43d3Ra1kgeljDLMc4lP4O823N6E9XMEjSK+T0KGbnnYTd ZLPCMUVdYLMsw== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4dqvK41hL2z4wHX; Tue, 13 Jan 2026 14:06:16 +1100 (AEDT) From: David Gibson To: passt-dev@passt.top, Stefano Brivio Subject: [PATCH v2 0/2] Allow listen functions to return fds Date: Tue, 13 Jan 2026 14:06:12 +1100 Message-ID: <20260113030614.29309-1-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.52.0 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: JCWZEC2QADMFWIQOE3U72BI5TUHISIFX X-Message-ID-Hash: JCWZEC2QADMFWIQOE3U72BI5TUHISIFX 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: For future forwarding changes, it makes more sense for the tcp and udp listen functions to return socket fds, rather than just success / failure. Make the change, fixing bug 186 along the way. Link: https://bugs.passt.top/show_bug.cgi?id=186 Changes in v2: * Fix several typos in comments and commit messages * Drop the --no-bindtodevice option, I was convinced it wasn't useful enough * Change from -EACCES to -EAFNOSUPPORT error code David Gibson (2): tcp, udp, conf: Don't silently ignore listens on unsupported IP versions tcp, udp: Make {tcp,udp}_listen() return socket fds conf.c | 24 +++++++++++++++++------- tcp.c | 13 ++++--------- udp.c | 10 ++++------ 3 files changed, 25 insertions(+), 22 deletions(-) -- 2.52.0