From nobody Thu Aug 29 11:50:42 2024 X-Original-To: rc@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Wvfjv6PB9z5Mpm0 for ; Thu, 29 Aug 2024 11:50:43 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wvfjv5GMTz4TT0 for ; Thu, 29 Aug 2024 11:50:43 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1724932243; a=rsa-sha256; cv=none; b=TnCT+441IY2jyd0ZBfOkGwNvJTFOQDLMxy9sZoT7WUNEkLZWYd0JfEG2ejBwXDvymO52Ix CsKq5syegEn40937Y8u11lvnmem4hGjeQb6R1vzvEKdGxGSgn1eGgsQpDTacuyi84U2ZqC VeANX+P3Q3lqRCNVoS3EnE+4ZHXIHv4tv9QEBYGNIyGzpfu8SPSSab3q+pTL1eu1YzOPOs 0506++ySCFQZhr6Y31c1Ted3rLPKTUmyMqDV2C2j/BItFt18zneQKynDqdPA0rIlY2NO8l JqeIiFUU9LhhB+enz1mpQoRcO7cc7DfnYjqEE26BhUqJQbiR5E0FiTpoF5KS3Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1724932243; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FZpnEuUulel/mIeNN+Gnfwi5S+BsvTj8KL3vO2nZXYk=; b=FUHps6kJG9ZWOZ0XKGbRkzjfiFaOl0IZx+mIklIWGHU7Dd4XApEodBnVMJVwjVxNzPGK1P 7mqR7F/+1zIgnD5kR8I1734fk2mDo6DwVX6gmwIFYNlj1W/DlX/y5y8OLMyThf6hj3i+mA E4n0rSTeEhCVSei0LiUyh0cLavzFGXUDrgqLlphyLz4ZsOlSh92OzBscmATvUZnbKqmKKe nWz3lFAJ5EWPXguy6bjVBEWD+U403DiHOV/ltoJDc1n9Jv3ggPSaEv0uL+ocydbV2ZWAzo suO9NpNk8l0VG1eorhJl0Z836ujpZrOIGfU+8lU5YzAtQcyGbye9vsFhfUt67g== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Wvfjv4t1NzG8n for ; Thu, 29 Aug 2024 11:50:43 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 47TBohqR053188 for ; Thu, 29 Aug 2024 11:50:43 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 47TBohMj053187 for rc@FreeBSD.org; Thu, 29 Aug 2024 11:50:43 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: rc@FreeBSD.org Subject: [Bug 278306] service netif start doesn't bring up the wireless interface if /etc/wpa_supplicant.conf is missing Date: Thu, 29 Aug 2024 11:50:42 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: wireless X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: bz@FreeBSD.org X-Bugzilla-Status: In Progress X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: rc@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Discussion related to /etc/rc.d design and implementation List-Archive: https://lists.freebsd.org/archives/freebsd-rc List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-rc@freebsd.org Sender: owner-freebsd-rc@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D278306 Bjoern A. Zeeb changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Open |In Progress --- Comment #10 from Bjoern A. Zeeb --- (In reply to Oleksandr Kryvulia from comment #9) Thanks for the feedback. That in theory seems the right solution to me. If we wanted to "automate" this and let meta-flags like DHCP and WPA count = as well, then we probably want to make sure the IF is up before wpa or hostapd start? I am not good at this and I probably do not understand all the possible side-effects but maybe someone from rc@ or net@ can review this? I wonder = if this would do the right thing... diff --git libexec/rc/network.subr libexec/rc/network.subr index 257643f48ba5..7e8502273353 100644 --- libexec/rc/network.subr +++ libexec/rc/network.subr @@ -216,14 +216,15 @@ ifconfig_up() ${IFCONFIG_CMD} $1 description "${_ifconfig_descr}" fi + if [ ${_cfg} -eq 0 ]; then + ${IFCONFIG_CMD} $1 up + fi if wpaif $1; then /etc/rc.d/wpa_supplicant start $1 _cfg=3D0 # XXX: not sure this should count elif hostapif $1; then /etc/rc.d/hostapd start $1 _cfg=3D0 - elif [ ${_cfg} -eq 0 ]; then - ${IFCONFIG_CMD} $1 up fi if ! noafif $1 && afexists inet6; then --=20 You are receiving this mail because: You are the assignee for the bug.=