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 9CDE75A027F for ; Wed, 17 May 2023 21:40:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684352439; 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=JJnwIKG3SaCm3ipTBSUYF+mj5VSZp6jqUGOu7LA9edk=; b=WfmlLOQgryssAgU3GJNqj2JFw80FamDvSiqeBSoknXJ43DNZ0wPEEZPL09e4fOKqll6YOZ xo+dpreBa07Y4YvbAq2n7wTO2rXE1+voqCttxJ606zfNegwxJDg5kEM4Qjv0CN5xHed4pl dkRnOk7RiQmbT5o7dtyXo9ZjoXHkMvA= 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-111-HJFBmMRxOeWQ0Mz3EOKLsw-1; Wed, 17 May 2023 15:40:33 -0400 X-MC-Unique: HJFBmMRxOeWQ0Mz3EOKLsw-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 145DB87082E; Wed, 17 May 2023 19:40:33 +0000 (UTC) Received: from elisabeth (unknown [10.39.208.35]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 540EEC16024; Wed, 17 May 2023 19:40:32 +0000 (UTC) Date: Wed, 17 May 2023 21:40:21 +0200 From: Stefano Brivio To: David Gibson Subject: Re: [PATCH] tap: Don't update ip6.addr_seen to :: Message-ID: <20230517214021.49bc9ed4@elisabeth> In-Reply-To: <20230516003611.1699202-1-david@gibson.dropbear.id.au> References: <20230516003611.1699202-1-david@gibson.dropbear.id.au> Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: 3V6TSM5ICXFNCWHP4QSB5UWNTOEABXHZ X-Message-ID-Hash: 3V6TSM5ICXFNCWHP4QSB5UWNTOEABXHZ 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, 16 May 2023 10:36:11 +1000 David Gibson wrote: > When we receive packets from the tap side, we update the addr_seen fields > to reflect the last known address of the guest or ns. For ip4.addr_seen > we, sensibly, only update if the address we've just seen isn't 0 (0.0.0.0). > This case can occur during early DHCP transactions. > > We have no equivalent case for IPv6. We're less likely to hit this, > because DHCPv6 uses link-local addresses, however we can see an source > address of :: with certain multicast operations. This can bite us if we > try to make an incoming connection very early after starting pasta with > --config-net: we may have only seen some of those multicast packets, > updated addr_seen to :: and not had any "real" packets to update it to a > global address. I've seen this with some of the avocado test conversions. It looks like I haven't stared at enough packet captures yet... > In any case, it can never make sense to update addr_seen to ::, so > explicitly exclude that case. > > Signed-off-by: David Gibson Applied. -- Stefano