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 22B955A0276 for ; Fri, 11 Aug 2023 10:32:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=201602; t=1691742727; bh=MHSBIdQgidpXMRj9A46bXdNYUDaEzubUtw6O01l33Pg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=A4Y+u4idJ+POsC7zIZ26smyTwrNNThP43M9C1xcZ3aMJKO+VRYSEwYyTlRYOgJkW1 dx2yoz039DRzxYv9M2LPjwsGK9tqnsH5b1TXkDeCJIonDzEi06kqViBzCIdyaHFxEx eNgahUFb9ZTQEZNFdyEFwrNSIgOwYXa2LPT56r2E= Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4RMcTz1x78z4wxn; Fri, 11 Aug 2023 18:32:07 +1000 (AEST) From: David Gibson To: passt-dev@passt.top, Stefano Brivio Subject: [PATCH 1/6] tap: Don't clobber source address in tap6_handler() Date: Fri, 11 Aug 2023 18:31:58 +1000 Message-ID: <20230811083203.1019725-2-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230811083203.1019725-1-david@gibson.dropbear.id.au> References: <20230811083203.1019725-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: L7KCWYSJDTMW35LXXIVJI6XEMXNXT7BE X-Message-ID-Hash: L7KCWYSJDTMW35LXXIVJI6XEMXNXT7BE 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