From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id B0B8A5A026F for ; Thu, 24 Nov 2022 09:54:29 +0100 (CET) Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4NHsHg5BGwz4x1V; Thu, 24 Nov 2022 19:54:23 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=201602; t=1669280063; bh=XShQNN8FFmiZSbpbOiyX9UAQj/+oHu6lhOzrvUXy6fY=; h=From:To:Cc:Subject:Date:From; b=fa0BiUg+ouDR1OzNUDYPFDCwy3ZCYkgVkfBpIp8oYFuQMTK1xT9YfD34PikBwROrY tx1HcXTT+4LxWQQyavGqqEs4OfQu0UmgGDhRCY8VlTAo+43m/drZWz0iO+lc1NY3sJ dXm1s1U3KPQJ/jFWg2DORw+vaXUqFJHT20XpNtiU= From: David Gibson To: Stefano Brivio , passt-dev@passt.top Subject: [PATCH 0/4] udp: Fix some confusion of IPv4 and IPv6 control structures Date: Thu, 24 Nov 2022 19:54:17 +1100 Message-Id: <20221124085421.3027886-1-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.38.1 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: ESZX27AELNOQ2LNQ6BZOI37RB7I7IRHG X-Message-ID-Hash: ESZX27AELNOQ2LNQ6BZOI37RB7I7IRHG 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.3 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: It turns out a couple of places on the IPv4 specific inbound path accidentally use control structures that are supposed to be for IPv6. That could lead to weird behaviour in a rather complex set of circumstances. Path 1/4 here is the actual fix, the rest makes some clean ups to the code that should make similar mistakes harder errors harder to commit in future. This is based on my earlier cleanup of the UDP splicing code, although I think it will rebase trivially. David Gibson (4): udp: Fix inorrect use of IPv6 mh buffers in IPv4 path udp: Better factor IPv4 and IPv6 paths in udp_sock_handler() udp: Preadjust udp[46]_l2_iov_tap[].iov_base for pasta mode udp: Factor out control structure management from udp_sock_fill_data_v[46] udp.c | 184 ++++++++++++++++++++++++++-------------------------------- 1 file changed, 81 insertions(+), 103 deletions(-) -- 2.38.1