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 BDB7F5A026D for ; Sat, 3 Jun 2023 08:46:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1685774778; 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=g1l2VCgss2je4Z7QGkSFyDsPqILs/a6BKmwTDbRD+Vk=; b=iaDWYqyCJLFzCVIJNMPOuRJEJNeUBGjoxFA7kDsp3FhsTlB9ZGEVf/Tf2mAbRSIHdzSbH4 EVPSZqz/UBGT2J2m83XoBmxgZhmMcK6rh+X9F8D7OaQ71YXEXfVRTExMcDLnlnxRRSaToU z8mLBgtLlCflBRwNjpZCEBVZ+8Espjs= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-427-pcA-SB8KNSq13WmmFk40IA-1; Sat, 03 Jun 2023 02:46:16 -0400 X-MC-Unique: pcA-SB8KNSq13WmmFk40IA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 00F7A29A9CA0; Sat, 3 Jun 2023 06:46:16 +0000 (UTC) Received: from elisabeth (unknown [10.39.208.3]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DFD9E40CFD45; Sat, 3 Jun 2023 06:46:14 +0000 (UTC) Date: Sat, 3 Jun 2023 08:46:12 +0200 From: Stefano Brivio To: David Gibson Subject: Re: [PATCH] conf: Fix erroneous check of ip6->gw Message-ID: <20230603084612.5563f61f@elisabeth> In-Reply-To: <20230602050202.1378178-1-david@gibson.dropbear.id.au> References: <20230602050202.1378178-1-david@gibson.dropbear.id.au> Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: RD3QDXLUC4XFQ3ACBKEBMNKSXY5I7QM2 X-Message-ID-Hash: RD3QDXLUC4XFQ3ACBKEBMNKSXY5I7QM2 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, Justin Jereza 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 Fri, 2 Jun 2023 15:02:02 +1000 David Gibson wrote: > a7359f094898 ("conf: Don't exit if sourced default route has no gateway") > was supposed to allow passt/pasta to run even if given a template interface > which has no default gateway. However a mistake in the patch means it > still requires the gateway, but doesn't require a global address for the > guest which we really do need. > > This is one part (but not the only part) of the problem seen in > https://bugs.passt.top/show_bug.cgi?id=50. > > Fixes: a7359f094898 Thanks! Applied with: Reported-by: Justin Jereza Fixes: a7359f094898 ("conf: Don't exit if sourced default route has no gateway") Link: https://bugs.passt.top/show_bug.cgi?id=50 Signed-off-by: Stefano Brivio If it helps (not that you need to care, really): git show -s --abbrev=12 --pretty=format:"Fixes: %h (\"%s\")" "${sha}" or... scripts: https://lore.kernel.org/all/20190220205910.7bd7fd40@redhat.com/ https://lore.kernel.org/all/20190220213729.49deb54f@redhat.com/ > Signed-off-by: David Gibson > > --- > conf.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/conf.c b/conf.c > index d8414fe7..ffff235b 100644 > --- a/conf.c > +++ b/conf.c > @@ -708,7 +708,7 @@ static unsigned int conf_ip6(unsigned int ifi, > if (MAC_IS_ZERO(mac)) > nl_link(0, ifi, mac, 0, 0); > > - if (IN6_IS_ADDR_UNSPECIFIED(&ip6->gw) || > + if (IN6_IS_ADDR_UNSPECIFIED(&ip6->addr) || > IN6_IS_ADDR_UNSPECIFIED(&ip6->addr_ll) || > MAC_IS_ZERO(mac)) > return 0; -- Stefano