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 49E975A026D for ; Tue, 22 Aug 2023 04:11:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=201602; t=1692670296; bh=LtBHFGZOL1+NhzUZ1u5Gj7WpK8lo+HJPUO7AGQ5O7Us=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MTZXbHycF/H5GIbuJQpa3GQ/p2QcxFZYxAAxfM8pfKy796ItTnYGR2zW/iPOdPKtC sBpDZppXKX76LlNOySfX/JzVEmi9PkKStU/bAPgtRLuN2gLsoTJdA23ZmIq+7zn4s1 y67PEMLcYQ/L0wJtmWrHLb0OZ7Hg5YbntXo9Z4QA= Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4RVCWr2Jwhz4wxy; Tue, 22 Aug 2023 12:11:36 +1000 (AEST) From: David Gibson To: Stefano Brivio , passt-dev@passt.top Subject: [PATCH v3 1/9] tap: Don't clobber source address in tap6_handler() Date: Tue, 22 Aug 2023 12:11:22 +1000 Message-ID: <20230822021130.450542-2-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230822021130.450542-1-david@gibson.dropbear.id.au> References: <20230822021130.450542-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: LSUYE2XDH5XR6NJ4ZXYVLNXJTRTWP45Z X-Message-ID-Hash: LSUYE2XDH5XR6NJ4ZXYVLNXJTRTWP45Z 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