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 101285A026F for ; Tue, 22 Aug 2023 07:30:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=201602; t=1692682203; bh=LtBHFGZOL1+NhzUZ1u5Gj7WpK8lo+HJPUO7AGQ5O7Us=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=om5bUM/frNtOOYpWUZqyqDQ+Sja1f9/umamv9pYIkhPklG8QEMcBj9UJMub4QrxtG wgksC7CZA0FbpntrRBkmyurDioWSN7WMaqfQi2tWnsx0H1U0ixo38mnOmVa5SlRrc1 L+ofediKs2wKzTTzwQOSkvLgGzidcHkEFqelzB4I= Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4RVHwq3DDJz4wy3; Tue, 22 Aug 2023 15:30:03 +1000 (AEST) From: David Gibson To: Stefano Brivio , passt-dev@passt.top Subject: [PATCH v4 1/9] tap: Don't clobber source address in tap6_handler() Date: Tue, 22 Aug 2023 15:29:52 +1000 Message-ID: <20230822053000.1118063-2-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230822053000.1118063-1-david@gibson.dropbear.id.au> References: <20230822053000.1118063-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: NZXVXL7SFTM6PF5BZCYMKJOV2G2BMSTC X-Message-ID-Hash: NZXVXL7SFTM6PF5BZCYMKJOV2G2BMSTC 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 760deb7..6a14692 100644 --- a/tap.c +++ b/tap.c @@ -818,8 +818,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