Date: Sun, 17 Apr 2022 04:08:49 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 263358] hostapd rc script defines function hostapd_poststart() before $ifn Message-ID: <bug-263358-227@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
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.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-263358-227>