From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id 0314D5A0262 for ; Fri, 2 Jun 2023 07:02:11 +0200 (CEST) Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4QXW7y4bGqz4x47; Fri, 2 Jun 2023 15:02:06 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=201602; t=1685682126; bh=qvHFdgKCcqiY7fp1BSDbdiR9+YOlTdxQvyD0IV17bS8=; h=From:To:Cc:Subject:Date:From; b=EYraVP6lh0fnRtuvJKsvIpgcUKVSk1wiwORf/DUj9Py9zAZSWxcgsf1AXH1MQpphx qa7LZsDolNLqASQHMbnG+St5/SRlFZtHI/hir7jzslGCV05jSl0LOUh0M63crsrgce aQqdJrF9LVwrw56vygaLuMCVutu4yMuWz0ScUkiA= From: David Gibson To: passt-dev@passt.top, Stefano Brivio Subject: [PATCH] conf: Fix erroneous check of ip6->gw Date: Fri, 2 Jun 2023 15:02:02 +1000 Message-Id: <20230602050202.1378178-1-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: MAZYFVVTZKMMNSTKBWQUWQCZHV22SJ6D X-Message-ID-Hash: MAZYFVVTZKMMNSTKBWQUWQCZHV22SJ6D 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: 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 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; -- 2.40.1