Making wpa_supplicant work with dhclient on Fedora

Jouni Malinen j
Thu May 15 07:53:00 PDT 2008


On Thu, May 15, 2008 at 10:34:21AM -0400, Dan Williams wrote:

> I'd like to add the key/value pairs to the ifcfg files for WPA support,
> which NetworkManager needs anyway to use system connections.  That would
> also mean a fairly straightforward effort to make ifup-wireless write
> out a wpa_supplicant config file and launch the supplicant if you don't
> want to use NM for your interface.  The only problem is figuring out
> when the state changes to CONNECTED so that dhclient can be run if
> BOOTPROTO=dhcp.  I assume somebody could write a small tool that pokes
> the control interface to check for the connected state.

Isn't this one of the reasons for IFLA_OPERSTATE and IF_OPER_UP vs.
IF_OPER_DORMANT? Once the connection is ready for normal data frames
(e.g., 4-way handshake has been completed successfully), wpa_supplicant
sets operstate to IF_OPER_UP and that should be the signal for the DHCP
client to do its job.. If operstate is IF_OPER_DORMANT, the DHCP client
should not try to get an address and wait for long timeouts since the
network is not supposed to deliver DHCP packets at that point.

> It's up to the driver to send a disconnection SIOCSIWAP event when the
> association breaks, and that includes when the device goes down.  So if
> the device goes down, the supplicant should get the notice, and then try
> to re-establish the connection.  If the driver doesn't send that event,
> it's broken and we need to fix it.

Fully agreed here. It is not up to the supplicant to figure out if the
association went down or not if device goes down (unless of course
integrated userspace MLME is used to manage associations). I don't think
DHCP client should be setting the interface down in the first place, but
anyway, the driver/802.11 code in the kernel needs to indicate
disconnections regardless of what actually triggered them.

-- 
Jouni Malinen                                            PGP id EFC895FA



More information about the Hostap mailing list