From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id 3F8EA5A0271 for ; Fri, 11 Aug 2023 14:54:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=201602; t=1691758448; bh=MHSBIdQgidpXMRj9A46bXdNYUDaEzubUtw6O01l33Pg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gTh8I2MfojHF6sf4Y5CLiXdVGEr4dD0WEVLVaoO2Bd3Pt0u96gKV1dyZKRSZCX2yR d1S3h/xz4ffusQQILI9tKYW46ArKSDjms/ZVJu3Os1oGIvf1NN/AjRc23JCCO7M0Aa FiBC6mHARLkmlEhHCyAs8WtsGUxh17wg7vztPxko= Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4RMkJJ34tjz4wb8; Fri, 11 Aug 2023 22:54:08 +1000 (AEST) From: David Gibson To: passt-dev@passt.top, Stefano Brivio Subject: [PATCH v2 1/7] tap: Don't clobber source address in tap6_handler() Date: Fri, 11 Aug 2023 22:53:59 +1000 Message-ID: <20230811125405.1364340-2-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230811125405.1364340-1-david@gibson.dropbear.id.au> References: <20230811125405.1364340-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: 6Q7FUYAZTL55FIUUU6R7ND2OFVGK6SH5 X-Message-ID-Hash: 6Q7FUYAZTL55FIUUU6R7ND2OFVGK6SH5 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: In tap6_handler() saddr is initialized to the IPv6 source address from the incoming packet. However part way through, but before organizing the packet into a "sequence" we set it unconditionally to the guest's assigned address. We don't do anything equivalent for IPv4. This doesn't make a lot of sense: if the guest is using a different source address it makes sense to consider these different sequences of packets and we shouldn't try to combine them together. Signed-off-by: David Gibson --- tap.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/tap.c b/tap.c index c5ec006..d8723c7 100644 --- a/tap.c +++ b/tap.c @@ -817,8 +817,6 @@ resume: continue; } - *saddr = c->ip6.addr; - if (proto != IPPROTO_TCP && proto != IPPROTO_UDP) { tap_packet_debug(NULL, ip6h, NULL, proto, NULL, 1); continue; -- 2.41.0