Making wpa_supplicant work with dhclient on Fedora

Pavel Polischouk pavel.polischouk
Mon Jun 2 12:54:15 PDT 2008

> 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.
I was using this configuration for quite some time with Fedorass 6-8 
until NM became almost usable in 9. I was using the wpa_cli running as a 
daemon to monitor status change, and using a simple bash script to 
handle the connection changes (attached). In some versions I was able to 
use dbus-send to forward events to dhclient, then some interface got 
changed and I reverted back to restart dhclient from the command line 
every time (with a drawback that in this configuration it didn't always 
get the same IP address from dhcp server). The dbus-send lines are still 
there in the script though, commented out, so they could be reused 
knowing the correct path for dhcpcd settings.

To overcome the problems with ipw2200 and hidden AP, the script would 
also force ESSID through iwconfig on every disconnection.

The following lines were added to /etc/rc.d/init.d/wpa_supplicant:

 > daemon wpa_cli -B -a /etc/wpa_supplicant/

in start() and a corresponding

 > killproc wpa_cli

in stop().

This was working quite well, but got broken in F9 because wpa_cli cannot 
talk to wpa_supplicant when it's in dbus mode 

-------------- next part --------------
A non-text attachment was scrubbed...
Type: application/x-shellscript
Size: 1021 bytes
Desc: not available
Url : 

More information about the Hostap mailing list