From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by passt.top (Postfix) with ESMTP id 9BB885A026F for ; Tue, 22 Aug 2023 10:46:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1692693989; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Zz02Q8slqtpmpaQasLRUBgIVDDn/RinDeZVUThecgEw=; b=BoEtVFV8kcyu5UqxQMRL1QhwbwBrdOpBCqrLuvDd0DVWiG2XQHYEDenE09DTzGRu/4/fct ICX+2TAZGK/rmpKFpjkFD1bDbV+JfGE+/JtpIcI8dzeXmUZLBkVS+i8i7kZW8Y2q9z13Cc Z5IVI35tRhzKUZDaqEI8p0PYWRlYhWM= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-675-WDK-3woSM2yV6EZ4ClodAA-1; Tue, 22 Aug 2023 04:46:28 -0400 X-MC-Unique: WDK-3woSM2yV6EZ4ClodAA-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B5B51185A791; Tue, 22 Aug 2023 08:46:27 +0000 (UTC) Received: from elisabeth (unknown [10.39.208.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E87AD2026D4B; Tue, 22 Aug 2023 08:46:26 +0000 (UTC) Date: Tue, 22 Aug 2023 10:46:24 +0200 From: Stefano Brivio To: David Gibson Subject: Re: [PATCH v4 1/9] tap: Don't clobber source address in tap6_handler() Message-ID: <20230822104612.7a138ec2@elisabeth> In-Reply-To: <20230822053000.1118063-2-david@gibson.dropbear.id.au> References: <20230822053000.1118063-1-david@gibson.dropbear.id.au> <20230822053000.1118063-2-david@gibson.dropbear.id.au> Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: VMN5HMTGBAAMYXTUJTOX5D7JIT6JVVX7 X-Message-ID-Hash: VMN5HMTGBAAMYXTUJTOX5D7JIT6JVVX7 X-MailFrom: sbrivio@redhat.com 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: passt-dev@passt.top 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: On Tue, 22 Aug 2023 15:29:52 +1000 David Gibson wrote: > 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 was there from the beginning, and the reason, if I recall correctly, is that a guest, depending on how far it got in its configuration, might suddenly switch from using a link-local to a global unicast address -- and we didn't handle that in TCP routines. This should be fixed now, though, and: > 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. ...right, that would be the wrong place anyway. -- Stefano