Re: dhclient and wpa_supplicant

From: Stijn Hoop <stijn_at_win.tue.nl>
Date: Sun, 31 Jul 2005 23:45:38 +0200
On Sun, Jul 31, 2005 at 11:31:58AM -0700, Sam Leffler wrote:
> Stijn Hoop wrote:
> > On Fri, Jul 29, 2005 at 06:08:53PM -0700, Sam Leffler wrote:
> > > I just ran tests with wpa_supplicant and found that it does appear to 
> > > handle open ap's properly.
> >
> > I cannot get this to work, using 2 different MiniPCI cards and
> > a Linksys WRT54G, on a 7-CURRENT from yesterday.
> >
> > The cards:
> >
> > - an Intel Pro Wireless 2200B/G (model WM3A2200BG, Dell branded) using iwi
> > - a Dell Truemobile 1300 WLAN (bcm4306) using ndis
> >
> > For details, log files, etc, see
> >
> > http://sandcat.nl/~stijn/freebsd/20050731-wlan/
> 
> Sigh, well for iwi you do say:
> 
> "Maybe the problem is not with wpa_supplicant though; I cannot get 
> if_iwi to associate by using ifconfig manually either."
>
> Er, yeah, if you cannot associate w/o wpa_supplicant I'm not sure why 
> you'd think it'd be more capable? (unless you're using wpa)

Wasn't sure myself either; but maybe wpa_supplicant set some modes
differently then 'plain regular' ifconfig. At least now I know I have
to get it working first, so I'll try that in the future.

> The log shows:
> 
> Jul 31 11:04:17 pounce kernel: iwi0: 	macaddr          bssid 
> chan  rssi rate flag  wep  essid
> Jul 31 11:04:17 pounce kernel: - 00:50:fc:d6:85:82 00:50:fc:d6:85:82 
> 11    38 11M   ess   no  "default"!
> 
> which means you found one ap w/ an ssid of "default" and it was rejected 
> because you configured the device for a different ssid.  However I see 
> probe resp frames from LZ111 in your log but it's never added to the 
> scan list for some reason.  Seems like someone with iwi devices should 
> investigate.

OK, so this confirms a bug in if_iwi. I'll send a PR.

> The ndis driver shows nothing in the log that indicates it hooks up 
> properly to the net80211 layer so wpa_supplicant is unlikely to work 
> with it.  Unfortunately there are many drivers that bypass the net80211 
> layer causing applications written to the common api to not work.

:-(

> OTOH your dhclient.conf file is so trivial that I'm not surprised it works; 
> you could just as well have used:
> 
> ifconfig_ndis0="ssid LZ111 DHCP"

Didn't know that either, good idea. One less config file to edit.

> The issue with dhclient using dhclient.conf to set wireless parameters 
> is that it does so, then sends it's DHCP protocol msg, then waits a 
> fixed amount of time for a response from a DHCP server.  This is prone 
> to fail as different configurations take different amounts of time to 
> complete the scan+associate work.  Also dhclient (now) processes link 
> state and assoc/reassoc/disassoc msgs which confuses this approach.  I 
> did some changes to have it ignore these messages while setting the 
> media parameters but it was complicated and still routinely failed 
> because the timeouts were too small.  In the end I concluded that it 
> wasn't worth supporting this mechanism any more; that wpa_supplicant is 
> the better approach since it will scan ONCE and then select the 
> appropriate network (while dhclient had to scan once for each possible 
> network).  In general I have advocated that dhclient do less; in this 
> case I want dhclient to let someone else setup the wireless networking 
> parameters and have it do just the dhcp protocol.  The fact that 
> dhclient messes with media parameters for an interface is more a 
> byproduct of configuring wired networks (and not having better tools to 
> configure wireless networks).

OK, noted. So 'all it takes' is someone converting ndis to use all of the
802.11 api? (no idea how large a task this is).

> wpa_supplicant depends on a couple features in the net80211 layer to 
> work properly: manual roaming (forcing the driver to not automtically do 
> things like associate after scanning so it can instead decide which ap 
> to use), scan (scan for ap's and report results), and associate to a 
> particular ap (as identified in the scan results).  Past that it uses 
> the common ioctl's defined to set keys and other parameters that you 
> normally get to via ifconfig.  For wpa and 802.1x is needs some more 
> stuff.  Drivers that bypass the net80211 layer for some or all of this 
> stuff may not work correctly and should be fixed.

Is there a list of these drivers? How about ral/ural? I read about
other problems with those. About the only useful wireless option then
is an Atheros card?

Thanks for the detailed reply, some of this stuff makes more sense now.

--Stijn

-- 
I really hate this damned machine
I wish that they would sell it.
It never does quite what I want
But only what I tell it.

Received on Sun Jul 31 2005 - 19:45:42 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:40 UTC