I can confirm this for Ubuntu 8.04.1

REPRODUCTION:
create a wpa secured network manually using the gui or directly in 
/etc/network/interfaces.
reboot your system
interface will be marked up in /var/run/network/ifstate, but not joined in the 
WLAN.
"/etc/init.d/networking restart" will fix the situation

LIKELINESS:
100%

SYMPTOM:
WPA secured networks in /etc/network/interfaces won't properly come up on boot.

After "/etc/init.d/networking restart" everything works.  If you use network 
manager instead of /etc/network/interfaces, too, everything works OK.
Nevertheless this bug is really severe: not all machines can use network 
manager.
Network manager just joins wireless networks after a user has logged in because 
it uses the wlan keys in the users key ring.

On machines that use NFS or AFS user homes, this is a chicken and egg
problem. The users can only log in after the network is available
because they get their home mounted though the network. However, the
network will only be available after the user has logged on. Hence,
network manager *cannot* be used in such situations. The traditional
/etc/network/interfaces approach *must* be used for users with NFS or
AFS homes.

As network manager is not an option, and as the /etc/network/interfaces
approach does not work with WPA secured networks, networking does not
work *at all* for machines in WPA secured networks with NFS or AFS
users. This is a complete show stopper.

ANALYSIS:
The interface is tried to be brought up twice
1. "udev" starts it first
2. "/etc/rcS.d/S40networking" starts it as a second try, but will not do 
anything because the interface is already marked up

The problem is that the first call to wpa_cli from udev fails. At the time udev 
tries to ifup the interface, /tmp is mounted readonly. However, wpa_cli tries 
to create an AF_UNIX socket in /tmp and fails. Consequently, the interface 
cannot join the wireless network. However, the interface is still marked up by 
ifup.
On the second try, ifup from /etc/rcS.d/S40networking won't try to configure 
the WLAN interface, because it is already marked up.

That's why "/etc/init.d/networking restart" works: /tmp is usually
writeable when one runs /etc/init.d/networking, the interface is brought
properly down and hence marked down. Then it is brought up again, where
wpa_cli will happyly creates its socket in /tmp and configures the
interface successfully.

PATCH:
the attached patch is very easy, it simply replaces the location of wpa_cli's 
socket from /tmp to /var/run/network. This location is available at boot time 
soon enough and writeable as well.

Please apply the patch provided to the LTS distribution.
* it is a very simple patch
* and it solves a situation that currently doesn't work at all.


** Attachment added: "Lets wpasupplicant succeed if started from udev during 
boot"
   http://launchpadlibrarian.net/15778405/wpa_cli_from_udev.patch

-- 
wpa_supplicant does not start on boot
https://bugs.launchpad.net/bugs/192278
You received this bug notification because you are a member of Ubuntu
Bugs, which is a direct subscriber.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to