Bug#407936: [pkg-wpa-devel] Bug#407936: wpasupplicant: does not configure interface correctly when it is available at boot time

2007-02-08 Thread Kel Modderman
On Monday 22 January 2007 23:52, Ivan Zaera Avellon wrote:
 Package: wpasupplicant
 Version: 0.5.5-4
 Severity: normal
 Tags: patch


 When wpasupplicant is launched from /etc/wpa_supplicant/functions.sh it
 tries to use flag -W, which is supposed to make it wait until the wpa_cli
 attaches to the socket. The thing is, that the -W is not documented in
 wpasupplicant, and thus, it does not work (at least in my system). This
 causes wpa_cli to miss the CONNECTED event when the wireless network is
 available from the very first moment. As the event is missed, wpa_action is
 not called and the interface is not configured.

I reproduced this problem.

You did not supply a 'ctrl_interface' value in your configuration, therefore no
UNIX socket for communication with wpa_cli was created, and
wpa_supplicant did not take notice of the '-W' (wait for wpa_cli attachment
to ctrl_interface) option accordingly.

Please confirm my findings.

I updated the documentation for wpa-roam as below:

Index: debian/README.modes
===
--- debian/README.modes (revision 778)
+++ debian/README.modes (working copy)
@@ -262,6 +262,11 @@
 cp /usr/share/doc/wpasupplicant/examples/wpa_supplicant.conf.template \
/etc/wpa_supplicant/wpa_supplicant.conf

+NOTE: it is critical that the used wpa_supplicant.conf defines the location of
+  the 'ctrl_interface' so that a communication socket is created for the
+  wpa_cli (wpa-roam daemon) to attach. The mentioned example conf file,
+  wpa_supplicant.conf.template, has this set to a sane default.
+
 It is required to edit this configuration file, and add the network blocks for
 all known networks. If you do not understand what this means, start reading the
 wpa_supplicant.conf(5) manpage now.


Thanks, Kel.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#407936: [pkg-wpa-devel] Bug#407936: wpasupplicant: does not configure interface correctly when it is available at boot time

2007-01-25 Thread Kel Modderman
On Tuesday 23 January 2007 20:31, Ivan Zaera Avellon wrote:
 Hi Kel:

 It's OK for me to send you my configuration, but I need to know what you
 want exactly.

Your configuration looks fine.

buzzard:/home/kel# 
wpa_supplicant -W -ieth1 -Dwext -c/etc/wpa_supplicant/wpa_supplicant-dummy.conf 
-d
Initializing interface 'eth1' 
conf '/etc/wpa_supplicant/wpa_supplicant-dummy.conf' driver 'wext' 
ctrl_interface 'N/A' bridge 'N/A'
Configuration 
file '/etc/wpa_supplicant/wpa_supplicant-dummy.conf' - 
'/etc/wpa_supplicant/wpa_supplicant-dummy.conf'
Reading configuration file '/etc/wpa_supplicant/wpa_supplicant-dummy.conf'
ctrl_interface='/var/run/wpa_supplicant'
Initializing interface (2) 'eth1'
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: KEY_RX entering state NO_KEY_RECEIVE
EAPOL: SUPP_BE entering state INITIALIZE
EAP: EAP entering state DISABLED
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
SIOCGIWRANGE: WE(compiled)=21 WE(source)=18 enc_capa=0xf
  capabilities: key_mgmt 0xf enc 0xf
WEXT: Operstate: linkmode=1, operstate=5
Own MAC address: 00:0e:35:18:2c:a3
wpa_driver_wext_set_wpa
wpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=3 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_countermeasures
wpa_driver_wext_set_drop_unencrypted
Setting scan request: 0 sec 10 usec
Added interface eth1
CTRL_IFACE - eth1 - wait for monitor

That will wait until i use wpa_cli to connect to the control socket, which is 
the desired effect.

Are you telling me this does not work for you?

Thanks, Kel.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#407936: [pkg-wpa-devel] Bug#407936: wpasupplicant: does not configure interface correctly when it is available at boot time

2007-01-22 Thread Kel Modderman
tags 407936 - patch
thanks

On Monday 22 January 2007 23:52, Ivan Zaera Avellon wrote:
 Package: wpasupplicant
 Version: 0.5.5-4
 Severity: normal
 Tags: patch


 When wpasupplicant is launched from /etc/wpa_supplicant/functions.sh it
 tries to use flag -W, which is supposed to make it wait until the wpa_cli
 attaches to the socket. The thing is, that the -W is not documented in
 wpasupplicant, and thus, it does not work (at least in my system). This
 causes wpa_cli to miss the CONNECTED event when the wireless network is
 available from the very first moment. As the event is missed, wpa_action is
 not called and the interface is not configured.

 I suggest changing the file /etc/wpa_supplicant/functions.sh, in function
 init_wpa_cli, so that after wpa_cli is launched, we force a disconnect with
 wpa_cli to make wpasupplicant reconnect again and send the CONNECTED event.
 The proposed code would be:

 init_wpa_cli () {
 if [ -n $WPA_ACTION_SCRIPT ]; then
 local WPA_CLI_OPTIONS
 WPA_CLI_OPTIONS=-B -P $WPA_CLI_PIDFILE -i $WPA_IFACE

 wpa_msg verbose $WPA_CLI_BIN $WPA_CLI_OPTIONS -p
 $WPA_CTRL_DIR -a $WPA_ACTION_SCRIPT

 start-stop-daemon --start --oknodo $DAEMON_VERBOSITY \
 --name $WPA_CLI_PNAME --startas $WPA_CLI_BIN
 --pidfile $WPA_CLI_PIDFILE \ -- $WPA_CLI_OPTIONS -p $WPA_CTRL_DIR -a
 $WPA_ACTION_SCRIPT

 if [ $? != 0 ]; then
 wpa_msg stderr $WPA_CLI_BIN daemon failed to
 start return 1
 else
 wpa_msg verbose force disconnect to assure that
 wpa_cli receives CONNECTED event $WPA_CLI_BIN -P $WPA_CLI_PIDFILE -i
 $WPA_IFACE disconnect fi
 fi
 }


I nack this patch and propose that -W should be documented and fixed (it seems 
to work for me just fine, but is clearly undocumented).

Can you please disclose your configuration?

Thanks, Kel.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]