On Thu, Feb 01, 2018 at 09:50:09PM +0100, Stefan Sperling wrote: > mlarkin found the hard way that 'ifconfig iwn0 wpaakms 802.1x' doesn't > actually enable WPA, which means instead people need to type this to > make it work: ifconfig iwn0 wpa wpaakms 802.1x > > This diff saves 802.1x users 4 keystrokes and some head scratching > wondering why it won't work. > > ok? >
works here. no objections! (and thanks) > Index: ifconfig.c > =================================================================== > RCS file: /cvs/src/sbin/ifconfig/ifconfig.c,v > retrieving revision 1.353 > diff -u -p -r1.353 ifconfig.c > --- ifconfig.c 16 Jan 2018 10:33:55 -0000 1.353 > +++ ifconfig.c 1 Feb 2018 20:47:44 -0000 > @@ -1796,6 +1796,8 @@ setifwpaakms(const char *val, int d) > if (ioctl(s, SIOCG80211WPAPARMS, (caddr_t)&wpa) < 0) > err(1, "SIOCG80211WPAPARMS"); > wpa.i_akms = rval; > + /* Enable WPA for 802.1x here. PSK case is handled in setifwpakey(). */ > + wpa.i_enabled = ((rval & IEEE80211_WPA_AKM_8021X) != 0); > if (ioctl(s, SIOCS80211WPAPARMS, (caddr_t)&wpa) < 0) > err(1, "SIOCS80211WPAPARMS"); > } >
