IFF_RUNNING and hostapd

Jouni Malinen j at w1.fi
Tue Oct 26 09:38:37 EDT 2010


On Tue, Oct 12, 2010 at 01:24:00PM -0700, Dave Taht wrote:
> On Tue, Oct 12, 2010 at 10:14 AM, Jouni Malinen <j at w1.fi> wrote:
> > On Fri, Oct 01, 2010 at 03:32:42PM -0700, Dave Taht wrote:
> >> I recently configured an openwrt system (a nanostation M) as a pure

> > Which driver are you using for wlan0?
> 
> ath9k with nl80211

Ah.. I finally figured out what was happening. Something else in the
system is setting the interface to IF_OPER_DORMANT state and that
prevents IFF_RUNNING from showing up. In normal case, this would not
happen, but it looks like the multi-call hostapd/wpa_supplicant in
OpenWRT triggers this. I was able to reproduce this by forcefully
killing wpa_supplicant so that it does not have chance of cleaning up
the operstate change (which is needed for station mode).

> > hostapd does not control this and the exact behavior is likely to depend
> > on which driver is being used.
> 
> What does? My thought was basically IFF_RUNNING should be set
> somewhere between these steps on a non-bridged AP, for the first
> client that comes online - and unset after the last client goes
> offline.

IFF_RUNNING is set in the kernel; operstate DORMANT/UP can be set in
user space. hostapd never set this to DORMANT, so there was normally no
need for setting it to UP either. However, since other applications may
leave the interface to DORMANT operstate, I now added code in hostapd to
clear that to avoid this issue. The change in the development branch is
here:
http://w1.fi/gitweb/gitweb.cgi?p=hostap.git;a=commitdiff;h=e11f5a2cbc333113a3a1cc1aeea7f698c3936ca3

-- 
Jouni Malinen                                            PGP id EFC895FA


More information about the HostAP mailing list