From patchwork Wed Jun 8 12:00:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Angelo Compagnucci X-Patchwork-Id: 1640478 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.a=rsa-sha256 header.s=google header.b=mfTbhBJG; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=140.211.166.136; helo=smtp3.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LJ5Qn5rwhz9s75 for ; Wed, 8 Jun 2022 22:00:49 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 4E37A6109D; Wed, 8 Jun 2022 12:00:48 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mbSfODikV5QI; Wed, 8 Jun 2022 12:00:47 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id 7C4876109F; Wed, 8 Jun 2022 12:00:46 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id B558D1BF574 for ; Wed, 8 Jun 2022 12:00:44 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id A297542501 for ; Wed, 8 Jun 2022 12:00:44 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp4.osuosl.org (amavisd-new); dkim=pass (1024-bit key) header.d=amarulasolutions.com Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 64tM5klPNIFD for ; Wed, 8 Jun 2022 12:00:42 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) by smtp4.osuosl.org (Postfix) with ESMTPS id 81C3B417A7 for ; Wed, 8 Jun 2022 12:00:42 +0000 (UTC) Received: by mail-ed1-x529.google.com with SMTP id x62so26744089ede.10 for ; Wed, 08 Jun 2022 05:00:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=4IXBKXDSSFEuVlJRXSZHqEevosZ3N4hk8LYyfESIp88=; b=mfTbhBJG86v1VWfJ5Se5jrJaXbtLHsZjAC0nDiudwuNQNcKwjpBwAyZtwTano6z0OB LfkQO+N3IBraZmka9v7tLOi2XDrWAGtJinzp5pAu3kKMn1lm2X387YHdPaJ6VVwXVBhM cp8lc1glecreo1TREnXLBzf8U+JbcgE5niL/Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=4IXBKXDSSFEuVlJRXSZHqEevosZ3N4hk8LYyfESIp88=; b=ifTinRjruILXNnc7TCatew0aTRMVYOrrZF0GUR9yJwDyhsejP5Aq1IQBx2yG/PgJWR fvfrAySfVZXC4Agw8X9mGJ2b3q/jEWqijt0UVgIwjZeuDr36pMMQkutUFsuXxvayMJBq ON2bgzGygfSoIbWMk3rvi1WyOpG22mX2CVqDXA/Q8uZI24cipjhjAMgDbBTSdrqDZwjn cPdMUS7U5+Nvulr26WUQAXzueZtNzApgUULK325pTIizkbXIZ67RPfbzgqpcAj2pfLOn MP0czyZZdEak0Sc5ASfz2Yrn/ib3hOZxYIKhb6fe2y0wmIXsAzNb6rtzHpY2JPv12D+X D8iA== X-Gm-Message-State: AOAM530L/cdUiTcT5cMuBa24h8Uzsx+Ny6EGjhuvvWlWhFFGJ/tT3zp/ QS5HF2KQNx9WgE7SNcqdmS35DxmrKHhG0A== X-Google-Smtp-Source: ABdhPJzou87TaqWluLH6TTotSxJ08Bjy3Io1Eo0Cu4TSN5OhmlpH9KZPeySIYlrL7Q1fBF23/0BRmA== X-Received: by 2002:a05:6402:c4d:b0:42d:cb2a:1b8d with SMTP id cs13-20020a0564020c4d00b0042dcb2a1b8dmr39141500edb.214.1654689640722; Wed, 08 Jun 2022 05:00:40 -0700 (PDT) Received: from angeloc.pdxnet.pdxeng.ch (host085115199111.static.fidoka.tech. [85.115.199.111]) by smtp.gmail.com with ESMTPSA id my16-20020a1709065a5000b006fecf74395bsm9068289ejc.8.2022.06.08.05.00.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jun 2022 05:00:40 -0700 (PDT) From: Angelo Compagnucci To: buildroot@buildroot.org Date: Wed, 8 Jun 2022 14:00:26 +0200 Message-Id: <20220608120028.2768210-1-angelo@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [Buildroot] [PATCH v3 1/3] package/wpa_supplicant: fixing "Invalid configuration line" X-BeenThere: buildroot@buildroot.org 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: jagan@amarulasolutions.com, Angelo Compagnucci Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" Default configuration file is wrong for the default compiling options. Fixes: Successfully initialized wpa_supplicant Line 1: unknown global field 'ctrl_interface=/var/run/wpa_supplicant'. Line 1: Invalid configuration line 'ctrl_interface=/var/run/wpa_supplicant'. Failed to read or parse configuration '/etc/wpa_supplicant.conf'. Signed-off-by: Angelo Compagnucci --- package/wpa_supplicant/wpa_supplicant.conf | 1 - 1 file changed, 1 deletion(-) diff --git a/package/wpa_supplicant/wpa_supplicant.conf b/package/wpa_supplicant/wpa_supplicant.conf index 1994a6c739..f8a73d465f 100644 --- a/package/wpa_supplicant/wpa_supplicant.conf +++ b/package/wpa_supplicant/wpa_supplicant.conf @@ -1,4 +1,3 @@ -ctrl_interface=/var/run/wpa_supplicant ap_scan=1 network={ From patchwork Wed Jun 8 12:00:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Angelo Compagnucci X-Patchwork-Id: 1640480 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.a=rsa-sha256 header.s=google header.b=ZDt+SJje; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=140.211.166.138; helo=smtp1.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LJ5RH4drhz9s75 for ; Wed, 8 Jun 2022 22:01:15 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 125F284291; Wed, 8 Jun 2022 12:01:14 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wM5AXh3FL5xy; Wed, 8 Jun 2022 12:01:13 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id 1A9E18428A; Wed, 8 Jun 2022 12:01:12 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 7A0BC1BF574 for ; Wed, 8 Jun 2022 12:00:45 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 67BFC60C1E for ; Wed, 8 Jun 2022 12:00:45 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp3.osuosl.org (amavisd-new); dkim=pass (1024-bit key) header.d=amarulasolutions.com Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id goQtr9IE0zI2 for ; Wed, 8 Jun 2022 12:00:43 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) by smtp3.osuosl.org (Postfix) with ESMTPS id 5A82960C2D for ; Wed, 8 Jun 2022 12:00:43 +0000 (UTC) Received: by mail-ed1-x532.google.com with SMTP id v25so26762275eda.6 for ; Wed, 08 Jun 2022 05:00:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=j6NBf9LptvDn3NzAI9wuDqwKs+yhP3Nxktwux9m+/Uw=; b=ZDt+SJjeLnRkwpROIQB+Y4cliDJLzsnZiCSV+wpcL3HfKSTyWI07jMvEj/u+Vw561y 6jWK+lTFgMFiMnSxqCAcGs/LP8YeMo7oPEnKnP4SPGM84cpTP7mfT2zngjsLOlV4Q3SA HbiqKAHMtas4pWkb1vhfzE8dKg9OwTAZTgbW8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=j6NBf9LptvDn3NzAI9wuDqwKs+yhP3Nxktwux9m+/Uw=; b=OmLmEvS4PFHYUH8QyqVKzyW0mzefQ+lP5LBM5sbZG3do5ZE1bO9MToXhDOh9F6dCDw KphffnS6Qg0DAVrUhI2IQWOX50BCoiYIkLsIOkhwKM+SjYY9amw+PwYGuoNK3HNVJagr 7FRxYwOjRTAbSaijxvk/LIQ11iJjNymQiCfSm3lUfi1fkL9nXjameg5RaBovC+PlTcxr 2F8PXWWQ56cI8N0FkfQNV2opku5tW2znz04SYinp/W5yGP/5d11j7Hw6cl59lFCZpKmV sLiuzSVP5CdP5UGOeXtsC0ysSCO6LvOJNiT67UY4dMRbFtiyDLtH1LRFpZV2ptnY0ETP 0zmA== X-Gm-Message-State: AOAM530l9CbyvD5LXYIAiGzqZnYjWcMC0vVrcG/RxOI6C9vgfUr/jILU Nd6MqlFvu+mOmpvlslHXa7JzNijhyRWNhg== X-Google-Smtp-Source: ABdhPJxMx1ssykFirx4QkxXIKeU0HmqadlIjYFBrd5iTVOp9502jViL2ftx+1dvJj563LxZJeV5Qyg== X-Received: by 2002:a05:6402:d:b0:431:98fe:c5fd with SMTP id d13-20020a056402000d00b0043198fec5fdmr6728008edu.170.1654689641542; Wed, 08 Jun 2022 05:00:41 -0700 (PDT) Received: from angeloc.pdxnet.pdxeng.ch (host085115199111.static.fidoka.tech. [85.115.199.111]) by smtp.gmail.com with ESMTPSA id my16-20020a1709065a5000b006fecf74395bsm9068289ejc.8.2022.06.08.05.00.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jun 2022 05:00:41 -0700 (PDT) From: Angelo Compagnucci To: buildroot@buildroot.org Date: Wed, 8 Jun 2022 14:00:27 +0200 Message-Id: <20220608120028.2768210-2-angelo@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220608120028.2768210-1-angelo@amarulasolutions.com> References: <20220608120028.2768210-1-angelo@amarulasolutions.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH v3 2/3] package/wpa_supplicant: adding ifupdown support X-BeenThere: buildroot@buildroot.org 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: jagan@amarulasolutions.com, Angelo Compagnucci Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" Actually, configuring a wifi interface as per "interfaces" man: auto wlan0 iface wlan0 inet dhcp wpa-conf /etc/wpa_supplicant.conf doesn't work on buildroot because the line wpa-conf is ignored due to the lack of a proper ifupdown script to handle the wpa_supplicant initialization. Signed-off-by: Angelo Compagnucci Reviewed-by: Nicolas Cavallari --- v1 -> v2: * Simplify script to the minimum to have the service started (Thomas, Nicolas) v2 -> v3: * Move IF_WPA_CONF check early (Nicolas) package/wpa_supplicant/ifupdown.sh | 49 ++++++++++++++++++++++++ package/wpa_supplicant/wpa_supplicant.mk | 9 +++++ 2 files changed, 58 insertions(+) create mode 100755 package/wpa_supplicant/ifupdown.sh diff --git a/package/wpa_supplicant/ifupdown.sh b/package/wpa_supplicant/ifupdown.sh new file mode 100755 index 0000000000..569344b683 --- /dev/null +++ b/package/wpa_supplicant/ifupdown.sh @@ -0,0 +1,49 @@ +#!/bin/sh + +# This file is executed by ifupdown in pre-up, post-up, pre-down and +# post-down phases of network interface configuration. + +WPA_SUP_BIN="/usr/sbin/wpa_supplicant" + +# run this script only for interfaces which have wpa-conf option +[ -z "$IF_WPA_CONF" ] && exit 0 + +# Allow wpa_supplicant interface to be specified via wpa-iface +# useful for starting wpa_supplicant on one interface of a bridge +if [ -n "$IF_WPA_IFACE" ]; then + WPA_IFACE="$IF_WPA_IFACE" +else + WPA_IFACE="$IFACE" +fi + +WPA_SUP_PIDFILE="/run/wpa_supplicant.${WPA_IFACE}.pid" + +do_start () { + if [ ! -s "$IF_WPA_CONF" ]; then + echo "cannot read contents of $IF_WPA_CONF" + exit 1 + fi + WPA_SUP_CONF="-c $IF_WPA_CONF" +} + +case "$MODE" in + start) + do_start + case "$PHASE" in + post-up) + start-stop-daemon -S -q -x ${WPA_SUP_BIN} \ + -- -B -i ${WPA_IFACE} ${WPA_SUP_CONF} -P ${WPA_SUP_PIDFILE} + ;; + esac + ;; + + stop) + case "$PHASE" in + pre-down) + start-stop-daemon -K -p ${WPA_SUP_PIDFILE} + ;; + esac + ;; +esac + +exit 0 diff --git a/package/wpa_supplicant/wpa_supplicant.mk b/package/wpa_supplicant/wpa_supplicant.mk index c4cfe03371..af97f36eda 100644 --- a/package/wpa_supplicant/wpa_supplicant.mk +++ b/package/wpa_supplicant/wpa_supplicant.mk @@ -250,6 +250,14 @@ define WPA_SUPPLICANT_INSTALL_STAGING_CMDS $(WPA_SUPPLICANT_INSTALL_STAGING_WPA_CLIENT_SO) endef +ifeq ($(BR2_PACKAGE_IFUPDOWN_SCRIPTS),y) +define WPA_SUPPLICANT_INSTALL_IFUP_SCRIPTS + $(INSTALL) -m 0755 -D package/wpa_supplicant/ifupdown.sh \ + $(TARGET_DIR)/etc/network/if-up.d/wpasupplicant + ln -sf ../if-up.d/wpasupplicant $(TARGET_DIR)/etc/network/if-down.d/wpasupplicant +endef +endif + define WPA_SUPPLICANT_INSTALL_TARGET_CMDS $(INSTALL) -m 0755 -D $(@D)/$(WPA_SUPPLICANT_SUBDIR)/wpa_supplicant \ $(TARGET_DIR)/usr/sbin/wpa_supplicant @@ -259,6 +267,7 @@ define WPA_SUPPLICANT_INSTALL_TARGET_CMDS $(WPA_SUPPLICANT_INSTALL_PASSPHRASE) $(WPA_SUPPLICANT_INSTALL_DBUS) $(WPA_SUPPLICANT_INSTALL_WPA_CLIENT_SO) + $(WPA_SUPPLICANT_INSTALL_IFUP_SCRIPTS) endef define WPA_SUPPLICANT_INSTALL_INIT_SYSTEMD From patchwork Wed Jun 8 12:00:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Angelo Compagnucci X-Patchwork-Id: 1640479 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.a=rsa-sha256 header.s=google header.b=AgSJqqUU; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=2605:bc80:3010::137; helo=smtp4.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LJ5R25H8hz9s75 for ; Wed, 8 Jun 2022 22:01:02 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id C9985424FB; Wed, 8 Jun 2022 12:01:00 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GEOeYz352bkj; Wed, 8 Jun 2022 12:01:00 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id C426E416C3; Wed, 8 Jun 2022 12:00:58 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 1F2681BF574 for ; Wed, 8 Jun 2022 12:00:45 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 1B82D417A7 for ; Wed, 8 Jun 2022 12:00:45 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vxAO8KGku2sj for ; Wed, 8 Jun 2022 12:00:44 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by smtp4.osuosl.org (Postfix) with ESMTPS id 28946424FF for ; Wed, 8 Jun 2022 12:00:44 +0000 (UTC) Received: by mail-ed1-x52b.google.com with SMTP id o10so26731202edi.1 for ; Wed, 08 Jun 2022 05:00:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=fS1T17cB+3MrFgNJwz54OS8y4tISBsS1wTItXFsZW+I=; b=AgSJqqUUo+Esc6zOItyGgw7/JIl+PQhM6MAkZml1oDiMCb6aJ0NvokRyqSR/ZUPx2s 391fiSNTciJ+2KQDRHVbMJtVgLTJQ2WM+AGs/d8lH18m5qpzCD5KjpyN0lf9Rv17UIpP WFm1Z5hQXtBCN+uwukVFUq8xp005Kbb+dB93k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=fS1T17cB+3MrFgNJwz54OS8y4tISBsS1wTItXFsZW+I=; b=ykRrmmhYoWEgbK6uMu9EGeIdvp+34q2gvkfqEyX4KPjaqzy1Ezt76eXjrI7HQdLUU5 dMGM+ZK0hnqu/uUYrEOFQERSgIVVg79dFis5YOlvWfNjU8IXFnAooTzHSUnIX7P3fh6C swz6K6X9hdrBFh+ALKppSG8N4iLS3z4JLfbuIEciZAtUcrCpmHKv76+0X5GVWwREkq6P 93m8smDvy9MXgsGRtGUYrDRuKjm0gcIJVbdAeZmHGluTpZnZ2195twk3s/1SiuDZfrLe 2dM2VYJyk9B7Jnb63rmkDO9xbMSuHNnQN+LCgNcn3xKJFxn46d30+QyOdbpgp/xT2znF el6g== X-Gm-Message-State: AOAM531lBX00NbHuE2kPAR/2NOpwbc+OAePVL43xhBzoJgKhnU/zRW/G ti7HtciDRBC9FUVCntrUGbHAL6SbC6X0iQ== X-Google-Smtp-Source: ABdhPJynBYHdXVAshd32HY6dotcmlAaCerbeIU5ikhLeCc1B/QVEbeHhqt6IcjwVtMg/e+ahSlNvFA== X-Received: by 2002:a05:6402:26c3:b0:430:efd4:4edb with SMTP id x3-20020a05640226c300b00430efd44edbmr25575735edd.53.1654689642373; Wed, 08 Jun 2022 05:00:42 -0700 (PDT) Received: from angeloc.pdxnet.pdxeng.ch (host085115199111.static.fidoka.tech. [85.115.199.111]) by smtp.gmail.com with ESMTPSA id my16-20020a1709065a5000b006fecf74395bsm9068289ejc.8.2022.06.08.05.00.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jun 2022 05:00:42 -0700 (PDT) From: Angelo Compagnucci To: buildroot@buildroot.org Date: Wed, 8 Jun 2022 14:00:28 +0200 Message-Id: <20220608120028.2768210-3-angelo@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220608120028.2768210-1-angelo@amarulasolutions.com> References: <20220608120028.2768210-1-angelo@amarulasolutions.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH v3 3/3] package/busybox: make udhcp discover faster X-BeenThere: buildroot@buildroot.org 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: Thomas Petazzoni , jagan@amarulasolutions.com, Angelo Compagnucci Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" Instead of waiting almost 10 seconds foreground (3 discovery packets for 3 seconds retry delay) at each boot, make only one request then fork to background. This way, the behavior is the same for working interfaces, but it's way faster for interfaces where the address cannot be obtained straight away. Acked-by: Thomas Petazzoni Signed-off-by: Angelo Compagnucci --- package/busybox/busybox.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/busybox/busybox.config b/package/busybox/busybox.config index 52cb8ffcd8..2409cbcce1 100644 --- a/package/busybox/busybox.config +++ b/package/busybox/busybox.config @@ -1022,7 +1022,7 @@ CONFIG_UDHCP_DEBUG=0 CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=80 CONFIG_FEATURE_UDHCP_RFC3397=y CONFIG_FEATURE_UDHCP_8021Q=y -CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-b -R -O search" +CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-t1 -b -R -O search" # # Print Utilities