From patchwork Sun Jun 12 22:07: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: 1642596 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=Lx6EHciM; 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 4LLpjK47mDz9s75 for ; Mon, 13 Jun 2022 08:07:48 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 5C0BA417E2; Sun, 12 Jun 2022 22:07:44 +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 QeoyBdGa3Gl8; Sun, 12 Jun 2022 22:07:43 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id 3970D417D2; Sun, 12 Jun 2022 22:07:42 +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 581CC1BF2A2 for ; Sun, 12 Jun 2022 22:07:40 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 41C9B417D2 for ; Sun, 12 Jun 2022 22:07:40 +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 8gqCgzxYNhkc for ; Sun, 12 Jun 2022 22:07:37 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) by smtp4.osuosl.org (Postfix) with ESMTPS id 52960417A7 for ; Sun, 12 Jun 2022 22:07:37 +0000 (UTC) Received: by mail-ed1-x531.google.com with SMTP id o10so4976863edi.1 for ; Sun, 12 Jun 2022 15:07:37 -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=bdqQpCwqwaRB7xl8qPyWjtoiqlGLrvX6+7ThnMmGIyA=; b=Lx6EHciMJO5aksbZn5DSv0nd++xtUAOYlNsE4znT7jdthtzVPCsAGLC2PzotCuapDc fgt58pkLTp//fjvEvjLJLlX68oK05gix3C9v2MQCcfFQq+2vZLeYCsk5OmIZ4N1prjEP AEjTkbYnZQ1RLIgWQhwh1b7h/LR2cLFIWW5/w= 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=bdqQpCwqwaRB7xl8qPyWjtoiqlGLrvX6+7ThnMmGIyA=; b=OMR0OXUYNEBD2VH/Zm8mkjExrAecs6BGuJVDP7zRNBEfRILG+Z8gRhfa7FuFeUDy/f TPhvPB11u8bb14dRNZKwaYLE9Kd78LTmcfNTjEYKVM03BkU7rwsvtuC+r8nZ4x4BPUzw yKnrnA+mlK6TigHssSNrkyzBMbXT/BJgHKxeAdW39yGZOvfwkemCpFlpSknizZPT2V/V jFO/ZeqRTUBwDMYhvBiPeGppxDwgJUbXp5X0vDhNJXNCw4RL22kHp+Hk5mGY+zoTmauI Vp5CH1MIOuCi1LH6ldG4CVX4QnURHlLKym9VBoZGcKDHeQAKaAclhVCluT3Vil6t335h vTlw== X-Gm-Message-State: AOAM530sIyXuhD+YoBbzxumcO528pJfAxJcJODDgCEoEa1/FjqOl9GfN ACn2dQTAJNyYBsJYTgzI0ik0gFHyEvRB/g== X-Google-Smtp-Source: ABdhPJzT/C0VHgM2Phcy+oHQwbIaETVpvDOdP84tg1ho+gsNw4qHF0N3+9SPykF4ezs38kX54w0FxQ== X-Received: by 2002:a05:6402:1692:b0:42d:e291:67f3 with SMTP id a18-20020a056402169200b0042de29167f3mr61108411edv.392.1655071655419; Sun, 12 Jun 2022 15:07:35 -0700 (PDT) Received: from angelo-ThinkPad-X270.. ([37.162.241.219]) by smtp.gmail.com with ESMTPSA id a20-20020a1709063e9400b006feb002a620sm2955914ejj.1.2022.06.12.15.07.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Jun 2022 15:07:34 -0700 (PDT) From: Angelo Compagnucci To: buildroot@buildroot.org Date: Mon, 13 Jun 2022 00:07:27 +0200 Message-Id: <20220612220729.1231925-1-angelo@amarulasolutions.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Subject: [Buildroot] [PATCH v4 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: 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 --- v1 -> v4: * Enabling the ctrl_interface option when the config option is enabled package/wpa_supplicant/wpa_supplicant.conf | 2 +- package/wpa_supplicant/wpa_supplicant.mk | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/package/wpa_supplicant/wpa_supplicant.conf b/package/wpa_supplicant/wpa_supplicant.conf index 1994a6c739..20e9f7f842 100644 --- a/package/wpa_supplicant/wpa_supplicant.conf +++ b/package/wpa_supplicant/wpa_supplicant.conf @@ -1,4 +1,4 @@ -ctrl_interface=/var/run/wpa_supplicant +#ctrl_interface=/var/run/wpa_supplicant ap_scan=1 network={ diff --git a/package/wpa_supplicant/wpa_supplicant.mk b/package/wpa_supplicant/wpa_supplicant.mk index c4cfe03371..14f6a6e271 100644 --- a/package/wpa_supplicant/wpa_supplicant.mk +++ b/package/wpa_supplicant/wpa_supplicant.mk @@ -184,6 +184,12 @@ WPA_SUPPLICANT_DEPENDENCIES += readline WPA_SUPPLICANT_CONFIG_ENABLE += CONFIG_READLINE endif +ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_CTRL_IFACE),y) +define WPA_SUPPLICANT_ENABLE_CTRL_IFACE + sed -i '/ctrl_interface/s/^#//g' $(TARGET_DIR)/etc/wpa_supplicant.conf +endef +endif + ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_WPA_CLIENT_SO),y) WPA_SUPPLICANT_CONFIG_ENABLE += CONFIG_BUILD_WPA_CLIENT_SO define WPA_SUPPLICANT_INSTALL_WPA_CLIENT_SO @@ -259,6 +265,7 @@ define WPA_SUPPLICANT_INSTALL_TARGET_CMDS $(WPA_SUPPLICANT_INSTALL_PASSPHRASE) $(WPA_SUPPLICANT_INSTALL_DBUS) $(WPA_SUPPLICANT_INSTALL_WPA_CLIENT_SO) + $(WPA_SUPPLICANT_ENABLE_CTRL_IFACE) endef define WPA_SUPPLICANT_INSTALL_INIT_SYSTEMD From patchwork Sun Jun 12 22:07: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: 1642598 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=NZmONjvR; 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 4LLpjl5MWLz9s75 for ; Mon, 13 Jun 2022 08:08:11 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 1354260F13; Sun, 12 Jun 2022 22:08:10 +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 COjPyunjfDf0; Sun, 12 Jun 2022 22:08:09 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id 135C960E5D; Sun, 12 Jun 2022 22:08:08 +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 01CE01BF2A2 for ; Sun, 12 Jun 2022 22:07:41 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id E4BB960D78 for ; Sun, 12 Jun 2022 22:07:40 +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 AYwf2mEz5QYV for ; Sun, 12 Jun 2022 22:07:39 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by smtp3.osuosl.org (Postfix) with ESMTPS id CCEF360AC9 for ; Sun, 12 Jun 2022 22:07:38 +0000 (UTC) Received: by mail-ej1-x630.google.com with SMTP id n10so7777433ejk.5 for ; Sun, 12 Jun 2022 15:07:38 -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=ZJP8kdr0gnc3LdRYm4CiN5qRWasEUN4PYC0j5eQEt1U=; b=NZmONjvRbEy2eVr7SiNCH9KlRCxm3Rx7xm0/pYNl9qfuy7fVtGCC0y6XlOJRGw39nA a+pdNgeWl4KKitiMDbU6mB8/k0eNFFIBdRgBdJnuFWv+zS9u9Y/P24hwWSnVOKkMahRB 8XreCaeDEdSiq05NV7lX9GSv3LibVLo1O6TRk= 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=ZJP8kdr0gnc3LdRYm4CiN5qRWasEUN4PYC0j5eQEt1U=; b=jXPZQ/SdZiXibsWqzF8fBlYiu4/Sxy8+MChOkWP4pG6RsSayOwpOTbHGGVNVxGtfH1 inuJq8jLCySiQdoP1VziGFqn5eHkkLP3QhMjXgnYO905Z5JNro1kegueEDqNQkcOhfaL opj6BKS5bFD7Xqp8FszFWKZrEZxcAj7U19au9ov4Q7mF8Q+2C18rblIADU8QWbGiYvKs BUKUw2ceXpTDrlOQ5Y5X42oZvKcqlIrgD0ytFpGs+OdQGJLxhcDQv4es6mlUItja1Q8U h1czcQ9tZ28XFgAMC1ksyzJgAWgyjYdDQQCibu3P3F91G6r6/6AHIXPl3eh1wOeOGiCe bZKg== X-Gm-Message-State: AOAM531V8xh6Z73H+ejrwAStC8NMQRxdASikGs8T6B9lBODVbTLOQwzS 8PsvVIOSUUporoWgwsSqR/BBqDhbeY9ruw== X-Google-Smtp-Source: ABdhPJzHaInRBIb/3UtNJbidmhUwf7TFzCFpaC3xrPRSLYX/kG3YGde4FssE4QLG0swocKa4M0alQw== X-Received: by 2002:a17:906:1ca:b0:715:73f3:b50f with SMTP id 10-20020a17090601ca00b0071573f3b50fmr6784621ejj.374.1655071657035; Sun, 12 Jun 2022 15:07:37 -0700 (PDT) Received: from angelo-ThinkPad-X270.. ([37.162.241.219]) by smtp.gmail.com with ESMTPSA id a20-20020a1709063e9400b006feb002a620sm2955914ejj.1.2022.06.12.15.07.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Jun 2022 15:07:36 -0700 (PDT) From: Angelo Compagnucci To: buildroot@buildroot.org Date: Mon, 13 Jun 2022 00:07:28 +0200 Message-Id: <20220612220729.1231925-2-angelo@amarulasolutions.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220612220729.1231925-1-angelo@amarulasolutions.com> References: <20220612220729.1231925-1-angelo@amarulasolutions.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH v4 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: 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 14f6a6e271..afcd6502e3 100644 --- a/package/wpa_supplicant/wpa_supplicant.mk +++ b/package/wpa_supplicant/wpa_supplicant.mk @@ -256,6 +256,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 @@ -265,6 +273,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) $(WPA_SUPPLICANT_ENABLE_CTRL_IFACE) endef From patchwork Sun Jun 12 22:07:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Angelo Compagnucci X-Patchwork-Id: 1642597 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=clUCUXZS; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=2605:bc80:3010::136; helo=smtp3.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::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 4LLpjc0yW7z9s75 for ; Mon, 13 Jun 2022 08:08:03 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 916F860E2F; Sun, 12 Jun 2022 22:07:58 +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 VZ7q0zMi6Yiv; Sun, 12 Jun 2022 22:07:56 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id 75ACA60D78; Sun, 12 Jun 2022 22:07:55 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 86D791BF96B for ; Sun, 12 Jun 2022 22:07:40 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 81BEF83143 for ; Sun, 12 Jun 2022 22:07:40 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp1.osuosl.org (amavisd-new); dkim=pass (1024-bit key) header.d=amarulasolutions.com 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 cIh88Npw9Z8S for ; Sun, 12 Jun 2022 22:07:40 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by smtp1.osuosl.org (Postfix) with ESMTPS id C56E383131 for ; Sun, 12 Jun 2022 22:07:39 +0000 (UTC) Received: by mail-ej1-x631.google.com with SMTP id m20so7730542ejj.10 for ; Sun, 12 Jun 2022 15:07:39 -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=mLFukBuXzAZ0RvBRGL3+zX2cwyl6ZFzrsvChnEHyN4o=; b=clUCUXZSH4YE3mPJ8qyA4qdOGzOMoTf+ZQOKWzQEXNnBDblAVHifPuK2eszBmUkXpx T7VurfPDNLstMoPf72V1zhkTluffApUyk3yZasBeEvZhGKRtPvM6yRlfrV5lICBiZEzw rWY/RVlDZPPR5psxZGFX/DH/LjKxDrFzWcIXg= 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=mLFukBuXzAZ0RvBRGL3+zX2cwyl6ZFzrsvChnEHyN4o=; b=0NmtmFUroLa4Dq//7N8O7M5RLXYM2kJcapJmYfBvjPT5CJ0Er2pfLEPlQWrX9UyfC9 Fll7jSeApNWUsIXxLtUq+0xfmh/y5Mq+gE4RN+D3vQCa/c+vIid2UgZK7/0A4CrvrOem P5myZnNYhwQ9UzOfLC0uCJLHIrNnR1VMMJqEiYw4CNnil1soeuGitl8H2UFWj0MYlVwC AhaFCI8b+KwBDw38Rjf+bO6Iwdj/fxvWKTyPUz9ha9DLysxKSB8RwWgHCrD6z4jxFPo0 ZolGgO9sBMi/L3O2BPFLsegZ1E7H0zlyKhZUdmn6dw2OIceCYZOKxCF9Z7tiJXnBktgm kGKw== X-Gm-Message-State: AOAM533+63k9xYYlbs+pMN66J/QQXTvLxN57aCOS78crPkBNKEa79hyV lRAHcG0wMDkfxCUwSIM4l/PqpMZbVH6FLA== X-Google-Smtp-Source: ABdhPJzup9/qKoy1PrWSAF0xj3qsyEQEnVrRay4++cKHGreYJMNoVB7RBqn3Saulwul8eaMhSS017Q== X-Received: by 2002:a17:907:94c8:b0:711:d864:fd84 with SMTP id dn8-20020a17090794c800b00711d864fd84mr30330555ejc.18.1655071658052; Sun, 12 Jun 2022 15:07:38 -0700 (PDT) Received: from angelo-ThinkPad-X270.. ([37.162.241.219]) by smtp.gmail.com with ESMTPSA id a20-20020a1709063e9400b006feb002a620sm2955914ejj.1.2022.06.12.15.07.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Jun 2022 15:07:37 -0700 (PDT) From: Angelo Compagnucci To: buildroot@buildroot.org Date: Mon, 13 Jun 2022 00:07:29 +0200 Message-Id: <20220612220729.1231925-3-angelo@amarulasolutions.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220612220729.1231925-1-angelo@amarulasolutions.com> References: <20220612220729.1231925-1-angelo@amarulasolutions.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH v4 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 , 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