From patchwork Tue Feb 2 01:54:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Mendoza-Jonas X-Patchwork-Id: 1434408 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=mendozajonas.com header.i=@mendozajonas.com header.a=rsa-sha256 header.s=fm2 header.b=hXVoIeRu; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm1 header.b=F30vQO2/; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DV7Dn6RSZz9tjw for ; Tue, 2 Feb 2021 12:55:21 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 8A48286776; Tue, 2 Feb 2021 01:55:17 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pJq3gadWpbUW; Tue, 2 Feb 2021 01:55:13 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 7713186752; Tue, 2 Feb 2021 01:55:13 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 595521BF97E for ; Tue, 2 Feb 2021 01:55:12 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 515B0214EB for ; Tue, 2 Feb 2021 01:55:12 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dwkgb6YRumI9 for ; Tue, 2 Feb 2021 01:55:11 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by silver.osuosl.org (Postfix) with ESMTPS id A1DC7204EA for ; Tue, 2 Feb 2021 01:55:11 +0000 (UTC) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id BB96A5C01C6; Mon, 1 Feb 2021 20:55:10 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Mon, 01 Feb 2021 20:55:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= mendozajonas.com; h=from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; s=fm2; bh=zKWPZ6QZFkHr3 TRUhUR4mdduY4D/9k1LzThVclgZHXE=; b=hXVoIeRuJQ0HQw/GYGlU8gcksk2uz HyFt7/lAEoAM/U0y9P8/kmgqtN41e+YqiwBOYfuAGppTA3gZYbU1Pf7/rukhxOrF irgKJzcy9ea7EsS54F1lpojJ3bkta8Z9TEXlFODYmgJ+LzBlMBpnB2F6Fi25Gj+J ka7k3uaiR/Cs/XWGcnpypsmJ9a9oX0cjKA99Q6IGrlI1oNFayJQQUlGXz/G3UP+e TQy5ZxasnxHJ1OWbAv20dC6u6fg2/Wd3nnmw+16Sf0ewRjsBWGFsJoqQp9IkU6G/ otqBbFFDpvQGu3gwTp1IXX5LX7vXWQaPd/3+UD6AmnOB3eaeQQpdEIN5w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=zKWPZ6QZFkHr3TRUh UR4mdduY4D/9k1LzThVclgZHXE=; b=F30vQO2/Ui+FKtw7BeBx9Hoh007sc0YEl TImOurdq3VRxIwZsoimmbMiZnnwDAha/vRtgQl7z3XIHq+og1TMjNCsGPYvJLvpv mYNS43LzXk5kdG9EjwKADv9gYHpqd0e66HybdpDSdxUm8YW088vMiMjAhmJ3mi7V eTzDzccVWhUNaOf5pjXAP/8LIKwbSkOtY85DdWSwpWI+7xzq/14zG7chxyZFe223 pbTC9AuaxMwpEBg3awFb6MBZq/f/EzFCOaj6V1pxMVwjrA2xlE1oPmMGqeCg/zyN 5L4ouAlim4YDBanbUW60sKyf02xmN/TeKFhWR7CzNJMYZvWQ6aaqg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrfeelgdefgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffoggfgsedtkeertdertd dtnecuhfhrohhmpefurghmuhgvlhcuofgvnhguohiirgdqlfhonhgrshcuoehsrghmsehm vghnughoiigrjhhonhgrshdrtghomheqnecuggftrfgrthhtvghrnhepvdehtdehgeefgf ekueelgeekhfdugffhtdejiedtuedthefgieejffegvdekudegnecukfhppeejhedrudej vddrudejhedrvddufeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpehsrghmsehmvghnughoiigrjhhonhgrshdrtghomh X-ME-Proxy: Received: from localhost.localdomain (unknown [75.172.175.213]) by mail.messagingengine.com (Postfix) with ESMTPA id 473CF24005A; Mon, 1 Feb 2021 20:55:09 -0500 (EST) From: Samuel Mendoza-Jonas To: buildroot@buildroot.org Date: Mon, 1 Feb 2021 17:54:52 -0800 Message-Id: <20210202015452.98002-1-sam@mendozajonas.com> X-Mailer: git-send-email 2.30.0 MIME-Version: 1.0 Subject: [Buildroot] [PATCH] package/busybox: Fix check for IPv6 default route in udhcpc X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Samuel Mendoza-Jonas , ravikumar.bhattiprolu@gmail.com Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" The check for a default route is inverted, causing the script to wait for the timeout even when a default IPv6 route is available. Fix this up so that it exits early as expected. Reported-by: Bhattiprolu RaviKumar Signed-off-by: Samuel Mendoza-Jonas --- package/busybox/udhcpc.script | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/busybox/udhcpc.script b/package/busybox/udhcpc.script index ec4d9f6185..c73ad6c2ef 100755 --- a/package/busybox/udhcpc.script +++ b/package/busybox/udhcpc.script @@ -18,7 +18,7 @@ fi wait_for_ipv6_default_route() { printf "Waiting for IPv6 default route to appear" while [ $IF_WAIT_DELAY -gt 0 ]; do - if [ -z "$(ip -6 route list | grep default)" ]; then + if ip -6 route list | grep -q default; then printf "\n" return fi