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.= From nobody Thu Aug 29 15:24:32 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 4WvlSd1P2Pz5PcgQ for ; Thu, 29 Aug 2024 15:24:33 +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 4WvlSd0Cmyz4rYc for ; Thu, 29 Aug 2024 15:24:33 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1724945073; a=rsa-sha256; cv=none; b=VSeGhmk/AEkzgKnd4LaheKwL2XVhAV8gG4hgqIg6OPuFpOm7tblQ+U/PjtCfbIrHHoOGnM 6tDrT9RVTp0ZmfdbGK6qTPxUzPs/r5NEqsTgH241b62GQ5jI7HY0I6X6A35m8GIGekufP1 cX5TTDtu101Y6ahd/AMZlBbbZbYsrShcp3ouMxGzk7/j7QgChEzTcKaM5oh/r100baSI2k YJ10T9mHl8EluH2zo/T8IaD2APizn7l4QaocFJ5VsaT83jYtZrjPZULJjayAtXnDtMs//X PZr0PKVOMLwu5eh0FT73pZHwx5IsFfQSOZ+0nT4Ffa10AkmGrcWFLhU2sAuHOA== 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=1724945073; 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=9bVYY8irhEtJ6EplQgfLTPJeTbx3HecRICBnEmjsww8=; b=Hq0EjDfrljURwSZu5Wq1k/v5NN4Mq9fza/RTS2ZOLAl5j8zVmRI6sxg32gUpenV+YMfjTp i0w6MlvnASNs6l/9muflICchzbSq6+P0tmuH9WHWsbaU35CtJVsosR84dmoXndnm367/sB W5io+6BNl8YA5nGChhhfYd1wheWComTnaT68FeOTRdRKM/plzsbc2G2Lu5KQaNTd1inEPj 9JmQXf5Fye3eIZfWxMy8Ho8t/Sj/HlK3o8UL7nZTJ/ICYY2xezfydAbyxU7XwBdnPARVH0 Wlt7Z0KfUIW4jVqP+HGXvmK/GB8xK50J4tiH1efHbJjPxEO0nlDSZ3F1V64EbQ== 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 4WvlSc6rKjzNL5 for ; Thu, 29 Aug 2024 15:24:32 +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 47TFOWJT053495 for ; Thu, 29 Aug 2024 15:24:32 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 47TFOWps053492 for rc@FreeBSD.org; Thu, 29 Aug 2024 15:24:32 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 15:24:32 +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: portmaster@bsdforge.com 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: 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 --- Comment #11 from Chris Hutchinson --- (In reply to Bjoern A. Zeeb from comment #10) I think you're on the right track, Bjoern. But as I examined this approach, I discovered what may be hints to the problem here: libexec/rc/netif @ 152 # netif_common routine # Common configuration subroutine for network interfaces. This # routine takes all the preparatory steps needed for configuriing # an interface and then calls $routine. ... @ 175 # Don't check that the interface(s) exist. We need to run # the down code even when the interface doesn't exist to # kill off wpa_supplicant. # XXXBED: is this really true or does wpa_supplicant die? # if so, we should get rid of the devd entry While I could fully unwind the routine(s) to confirm whether this, or your approach is correct. I don't have time slices available ATM. IOW I agree someone from rc@ or net@ is the best direction. Maybe a PHAB review would be even better? --=20 You are receiving this mail because: You are the assignee for the bug.=