Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Apr 2022 07:04:08 +0000
From:      bugzilla-noreply@freebsd.org
To:        wireless@FreeBSD.org
Subject:   [Bug 263358] hostapd rc script defines function hostapd_poststart() before $ifn
Message-ID:  <bug-263358-21060-gi87RFsPuj@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-263358-21060@https.bugs.freebsd.org/bugzilla/>
References:  <bug-263358-21060@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D263358

--- Comment #3 from Joshua Kinard <freebsd@kumba.dev> ---
I suspect that the need for $ifn was for systems with more than one wireless
radio, so the user would have to supply an interface so the the correct rad=
io
was restarted by ifconfig.  In my case, I only have a single radio, so I do=
n't
need to always pass an interface.  The preexisting logic allows for this and
it's been that way for some time.  So I am pretty confident that it is not
usage error.  If it is, then that is still a bug because the rc script shou=
ld
explicitly check and enforce that usage.

When the poststart function was added, I guess the committer didn't realize
that hostapd made passing $ifn entirely optional, thus the poststart functi=
on
would break if $ifn wasn't defined (after the function gets moved to be bel=
ow
$ifn's definition).

I think the rc script could be made more robust by including some rc variab=
les
in rc.conf to specify the defined wireless interfaces, then the rc script c=
an
restart each defined interface appropriately.  Most systems won't (as far a=
s I
know) exceed two radios (2.4GHz & 5GHz), so this won't add much cruft to
rc.conf.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-263358-21060-gi87RFsPuj>