Making wpa_supplicant work with dhclient on Fedora

Pavel Roskin proski
Mon Jun 2 14:07:19 PDT 2008

On Mon, 2008-06-02 at 15:54 -0400, Pavel Polischouk wrote:

> 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().

That should probably be a separate script in /etc/rc.d/init.d/ to
survive upgrades.

I like the idea of running dhcplient from wpa_supplicant.  It follows
the approach to configure the interface from the lower level to the
upper level.

Normally, the interface is brought up, then dhclient is run or static IP
is configured.  To accommodate layer 2 configuration, bringing up the
interface should run wpa_supplicant, and if wpa_supplicant succeeds, it
would run dhclient.

Layer 2 configuration is not just for wireless networks.  It may be a
wired network with 802.1x.  Serious distributions should be able to get
it right.

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

Well, I guess if you need to edit /etc/sysconfig/wpa_supplicant anyway,
you can remove -u there.

Pavel Roskin

More information about the Hostap mailing list