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 BD82C5A026F for ; Fri, 28 Jul 2023 11:48:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=201602; t=1690537714; bh=PAoMYKhoKj4e3pkoEQUEzHJY1pvD0LeWjGbbybuWh+8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=I3N9Z36AcE6G0CvQEstffsnw21A/6fVnmbu/P6VF/JtRExBb1XSVptEkfdkwouiCi RRbSJ4S1YcCpiLDwf9ehaV5zerrPg5oK38N9QdQ+1m6Z8l+W+MIPl24DaphRwlKDiB WICiU4IotPm9nKCK3fYuO1n+8GMiD3I/VrLSFxvQ= Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4RC2rf6JPCz4wyM; Fri, 28 Jul 2023 19:48:34 +1000 (AEST) From: David Gibson To: Stefano Brivio , passt-dev@passt.top Subject: [PATCH 1/8] tap: Don't clobber source address in tap6_handler() Date: Fri, 28 Jul 2023 19:48:24 +1000 Message-ID: <20230728094831.4097571-2-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230728094831.4097571-1-david@gibson.dropbear.id.au> References: <20230728094831.4097571-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: SUDFWBFBQHKL43V23GXOEIUOYL3E4KID X-Message-ID-Hash: SUDFWBFBQHKL43V23GXOEIUOYL3E4KID 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 a6a73d3..d8aa633 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