From nobody Sun Apr 17 04:08:49 2022 X-Original-To: bugs@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 482D811CFA05 for ; Sun, 17 Apr 2022 04:08:50 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KgxQ9572lz3JVw for ; Sun, 17 Apr 2022 04:08:49 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) 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 7158F17155 for ; Sun, 17 Apr 2022 04:08:49 +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 23H48n5D065490 for ; Sun, 17 Apr 2022 04:08:49 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 23H48nW7065489 for bugs@FreeBSD.org; Sun, 17 Apr 2022 04:08:49 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: bugs@FreeBSD.org Subject: [Bug 263358] hostapd rc script defines function hostapd_poststart() before $ifn Date: Sun, 17 Apr 2022 04:08:49 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: misc X-Bugzilla-Version: 13.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: freebsd@kumba.dev X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: 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: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1650168529; 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; bh=BjINV4Wmhwn55bgPLhbTsQj9DCmk5vorrounskahXJ8=; b=YHmtZN1PAquw59gt/yXevq+DCSWmeMA/7iFJR7tdRzNxjT8ivjfcUHzJdjRhoaiQ9n/qgn 4lFDPT3nFhi7LQwihVlySyPhZHT0wO+urB2n16eKukOXbkAAATGbf3mHKK81CW9ZUacmG4 MLzeNpmU4SlOAkI6xBBi91NkXjgxWYjIgPxMR2qJ9oHlsfKm1yVDOCRepC+U+Xg8C85uNc oJ3nFOJS+r3iUNF7laT2wthSZGG9rN7ZSMpZy7u9XmLvq+rahoN4Palq6Bxb9G0sV6P1go EgotZovQo7HGfa+IXsObgQoWngfXBdVqdw3CX4CYtQqB8uW3KMxs+KdAey09kA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1650168529; a=rsa-sha256; cv=none; b=Oj+uJTDIkakAfB02xNr/HW9rlAh/SNIO5RnyGDCvZmB9vyAFoNO2gzgHjQYdd0kQpy4k+V YERVPoYi/DZrIARlSG1JSL3epZwL0QS7u36PVatCUhX6DxfVCY418fViXD16W32Nj3Gucx luPZe1HYVy8f1/EmIoXyVKx4Qp2rUZCZWc9t064b1Id1K9WjlA7+6zjQ8VTVOx+sucCCQz dHlRTBWhKvr5kgT48fCtEU2nrJv+8gNqGt1R3lKjwjzmmF5oS21p4d38duM2WjabI6Km5w AfYdBu18zhb0l+CkWPSeynFfiGI3WB+jPBeucTLFQwHhlM6n0RJITfvFRfUEKQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D263358 Bug ID: 263358 Summary: hostapd rc script defines function hostapd_poststart() before $ifn Product: Base System Version: 13.1-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: misc Assignee: bugs@FreeBSD.org Reporter: freebsd@kumba.dev In commit 0da2c91e6452, the hostapd rc script was modified to down and then= up the wireless interface by way of a new hostapd_poststart function: hostapd_poststart() { ifconfig ${ifn} down sleep 2 ifconfig ${ifn} up } But this function, which references the variable $ifn, is defined before $i= fn is defined. Thus, when hostapd is started or restarted, the poststart func= tion simply executes 'ifconfig down', sleeps, then 'ifconfig up'. This results = in errors from the ifconfig calls that 'down' and 'up' are not valid interface= s, and the wireless interface is not properly restarted. I don't follow the logic because I don't know what is supposed to be passed= in $2 to $ifn. Would it be better to define a new var for rc.conf called something like $hostapd_iface that the user can use to identify which inter= face is the wireless one that hostapd should control? Note, this first appeared in 13.1-RC2, so a fix should probably be pushed o= ut so it makes it into the final RC before release. --=20 You are receiving this mail because: You are the assignee for the bug.=