[Bug 263358] hostapd rc script defines function hostapd_poststart() before $ifn
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 18 Apr 2022 07:04:08 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=263358 --- 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 radio was restarted by ifconfig. In my case, I only have a single radio, so I don'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 should 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 function would break if $ifn wasn't defined (after the function gets moved to be below $ifn's definition). I think the rc script could be made more robust by including some rc variables in rc.conf to specify the defined wireless interfaces, then the rc script can restart each defined interface appropriately. Most systems won't (as far as I know) exceed two radios (2.4GHz & 5GHz), so this won't add much cruft to rc.conf. -- You are receiving this mail because: You are the assignee for the bug.