fails to autostart using the if-preup.d script

Bug #36634 reported by Mozg
14
Affects Status Importance Assigned to Milestone
wpasupplicant (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

I've just updated the wpasupplicant package to version 0.4.8-0ubuntu1 on Dapper Drake. I am aware that startup method has changed. The wpasupplicant script located in /etc/network/if-preup.d fails to autostart when the interface is brought up. I have the atheros madwifi wireless card and I use madwifi drivers that came with distribution.

This happens everytime when i boot my laptop. When the networking script brings up the ath0 interface, the wpasupplicant script doesn't not start. After my computer is booted, I used ifdown ath0 and ifup ath0, as well as /etc/init.d/networking stop/start/restart, however this still fails to start the wpasupplicant.

However, if I manually start the wpa_supplicant, and stop it after a successfull start, the ifup ath0 and /etc/init.d/networking start/restart successfully starts the wpasupplicant script. This is very odd, and i haven't seen a behaviour like this before, taking into account that when I manually start the wpa_supplicant, I use exactly the same command line as the /etc/ini.d/networking/if-preup.d/wpasupplicant uses during a successfull start.

This problem prevents a successfull start up of the wireless networking during the laptop boot.

Revision history for this message
Reinhard Tartler (siretart) wrote :

please upgrade to 0.4.8-0ubuntu2, and read /usr/share/doc/wpasupplicant/README.{Debian,modes}.
Does this explain the new situation in wpasupplicant? Please set this bug to 'rejected' if things are clear to you now.

Changed in wpasupplicant:
status: Unconfirmed → Needs Info
Revision history for this message
Damien Raude-Morvan (drazzib) wrote :

I can confirm a similar behavior :

- wpa_supplicant is not started at bootup
- work fine with /etc/init.d/networking restart
- work fine with ifup eth0

----- /etc/network/interfaces -----
auto eth0

# The wireless network interface
iface eth0 inet dhcp
      wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

Revision history for this message
Mozg (andrei-arhont) wrote :

Hi

I've just upgraded to the latest package and I am still experiencing the issue with autostart. Perhaps I should mention that I provide a static address for the wireless interface. My /etc/network/interfaces looks like this:
----
auto ath0

# The primary network interface
iface ath0 inet static
        wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
        wpa-driver madwifi
        address 192.168.xxx.xxx
        netmask 255.255.255.0
        network 192.168.xxx.0
        broadcast 192.168.xxx.255
        gateway 192.168.xxx.xxx
----

If I change the interfaces file to use dhcp instead of the static, the wpasupplicant scripts starts without any problems when i either do /etc/init.d/networking restart or ifup ath0. However, if I use static, the wpasupplicant doesn't start unless i manually start it first. Once the wpa_supplicant has been manually started and stopped, the ifup ath0 successfully starts the wpasupplicant.
As far as i can see, there seems to be some issues with the use of static in the /etc/network/interfaces.

Revision history for this message
Reinhard Tartler (siretart) wrote :

thank you for your report, but issues with static configuration is another bug. please file a separate bug for this.

the current package does not ship any init file anymore at all, so wpa_supplicant should not run as system service. It is started by ifupdown, if you have suitable configuration in your /etc/network/interfaces. This is intendet this way, we will include more docs in future uploads about this.

As far as I follow this bugtrail, I think this bug can be closed.

Revision history for this message
Fred (sedak) wrote :

well, i needed to make two things before the autostart dor my wireless card work
- first, remove the --allow=auto from /etc/init.d/loopback because my root partition is not writable at that time and wpa_supplicant can't start because it can't create its socket file
-second, add af_packet to /etc/modules : otherwise, when ifup wlan0 is first call, /proc/net/packet does not exist so it fails

Revision history for this message
Damien Raude-Morvan (drazzib) wrote :

In my case, new configuration options don't work at PC bootup :)

I have to manualy "ifdown eth0; ifup eth0" or "/etc/init.d/networking restart" to bring the interface up.

Revision history for this message
Fred (sedak) wrote :

actually, removing allow=auto doesn't do a thing
the main problem is the test with /proc/net/packet. somehow, we need to load af_packet before doing this test
otherwise, that new script is cool, thanks a lot ! i hope the gui to configure the wpa will be here soon :-)

Revision history for this message
Elias Oltmanns (oltmanns) wrote :

The check for /proc/net/packet really should be handled differently
-- or even dropped, for that matter, and replaced by a comment in the
docs. Using madwifi, for instance, the ath_pci module is autoloaded
during bootup which is required for wpasupplicant to even try start up
the interface. However, af_packet is autoloaded on demand when
bringing up the interface and thus /proc/net/packet needn't be there
before wpa_supplicant is started for the first time. I reckon there
are rather few situations in which af_packet actually isn't available
for autoloading; on the other hand, there really is no reason for
loading this module in /etc/modules or somewhere else just because it
might be used every once in a while.

Revision history for this message
Reinhard Tartler (siretart) wrote :

I'm quite confident that this issue should be fixed with version 0.4.8-1build1. If you still experience problems, please reopen this bug, and attach your /etc/network/interfaces and the output of the following command to this bug:

ifup --verbose eth1

(or however your interface is named)

Changed in wpasupplicant:
status: Needs Info → Fix Released
Revision history for this message
Damien Raude-Morvan (drazzib) wrote :

I can confirm that this issue is fixed in version 0.4.8-1build1.

Thanks.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.