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=202608 header.b=id0b2HVW; dkim-atps=neutral Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id 7D7505A0262 for ; Tue, 18 Aug 2026 06:35:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202608; t=1787027716; bh=kSb6gRf8QzJ/qbiwoWRkzsJFn1huRWhdx8OX5Y2Fzu0=; h=From:To:Cc:Subject:Date:From; b=id0b2HVW2cFMW3NsWj3ZnXuy2NWO7qPjmFnRynHWkwnrfl40znDNZpyZ9r4oBRg7I XDCwW4LeXQjjToOLYN32jFgjbb4W17ILVcBvaLpwCMfDtk7wt77O2kldvCdYitf1xV NePeCLkQe/SoElaRGZG1QLaW5M3NMfc9qEoQQcuizU+nOtLE21RkgekLNg485YxagH Leg3pdgDW3i/k1u2ZAdSlhX7jlwev9lUvsth13MPnRzqGa/7M4KDYxjgTSodWuCtJ/ 7A2FIYT/hKSIJoi7CSBBXYRs5Rx8PDIDBfi0B4sv7jkSWed8STXL4nBCag17Wj/y2Q BWGrCA8JR5x+g== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4hPH1c1DJwz4wJK; Tue, 18 Aug 2026 14:35:16 +1000 (AEST) From: David Gibson To: passt-dev@passt.top, Stefano Brivio Subject: [PATCH] udp_flow: Remove obsolete comment Date: Tue, 18 Aug 2026 14:35:13 +1000 Message-ID: <20260818043513.951488-1-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.55.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: QPYMPZ6C2Z74DDANTUVHPEROX753GGLA X-Message-ID-Hash: QPYMPZ6C2Z74DDANTUVHPEROX753GGLA 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: Ammar Yasser , Anshu Kumari , 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: This comment was true - although the upshot was not particularly clear - when it was introduced. However, for other reaosns we now *do* always populate ini->oaddr from flow_initiate_sa(). So rather than explaning why we can't, we can actually validate ini->oaddr. Signed-off-by: David Gibson --- udp_flow.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/udp_flow.c b/udp_flow.c index f59649f6..a29f3562 100644 --- a/udp_flow.c +++ b/udp_flow.c @@ -247,11 +247,8 @@ flow_sidx_t udp_flow_from_sock(const struct ctx *c, uint8_t pif, ini = flow_initiate_sa(flow, pif, s_in, dst, port); if (!inany_is_unicast(&ini->eaddr) || + inany_is_unspecified(&ini->oaddr) || ini->eport == 0 || ini->oport == 0) { - /* In principle ini->oddr also must be specified, but when we've - * been initiated from a socket bound to 0.0.0.0 or ::, we don't - * know our address, so we have to leave it unpopulated. - */ flow_err_ratelimit(flow, now, "Invalid endpoint on UDP recvfrom()"); flow_alloc_cancel(flow); -- 2.55.0