[pkg-wpa-devel] Bug#622757: wpasupplicant: Faulty ifupdown/functions.sh script?

Sedat Dilek sedat.dilek at googlemail.com
Sun Apr 17 09:13:15 UTC 2011


On Sun, Apr 17, 2011 at 10:29 AM, Sedat Dilek
<sedat.dilek at googlemail.com> wrote:
> On Fri, Apr 15, 2011 at 1:17 PM, Kel Modderman <kel at otaku42.de> wrote:
>> On Thu, 14 Apr 2011 10:50:30 PM Sedat Dilek wrote:
>>> Package: wpasupplicant
>>> Version: 0.7.3-2
>>> Severity: normal
>>>
>>> Hi,
>>>
>>> with wpasupplicant-0.7.3 entering Debian/sid my Internet connection is
>>> not established anymore.
>>>
>>> By replacing the ifupdown/functions.sh script from wpasupplicant
>>> (0.6.10-2.1) things are as used to.
>>> I haven't got the time to look deeper into this as it WorksForMe.
>>>
>>> I have collected all relevant material (/e/n/i), the files of
>>> ifupdown-dirs from 0.6.10 and 0.7.3 (see also the diffs) and added my
>>> dsc|diff files into the attached tarball.
>>>
>>> If this kind of matters I use systemd as sysvinit replacement and
>>> resolvconf helps for static-IP network setup.
>>> Furthermore, I have no ifplugd or suggested libengine-pkcs11-openssl installed.
>>>
>>> If you have detailed instructions on how to investigate the issue,
>>> please let me know.
>>
>> Without reviewing any diff, it could be related to #622589
>>
>> Kel.
>>
>
> While playing with "IO-less dirty throttling v7" patcheset I did fall
> in some few cases in a WLAN connection which was not setup at startup.
>
> I guess all trouble is due to fast parallelization (especially
> systemd) and the non-existence of the socket-file.
>
> The relevant part (until - do -done ) was removed in functions.sh
> while upgrade 0.6.x -> 0.7.x:
> ...
> -       until [ -S "$WPA_CTRL_DIR/$WPA_IFACE" ]; do
> -               if [ "$WPA_SOCKET_WAIT" -ge "$MAX_WPA_SOCKET_WAIT" ]; then
> -                       wpa_msg stderr "ctrl_interface socket not
> found at $WPA_CTRL_DIR/$WPA_IFACE"
> -                       return 1
> -               else
> -                       wpa_msg verbose "waiting for
> \"$WPA_CTRL_DIR/$WPA_IFACE\": " \
> -                               "$WPA_SOCKET_WAIT (max. $MAX_WPA_SOCKET_WAIT)"
> -               fi
> -
> -               WPA_SOCKET_WAIT=$(($WPA_SOCKET_WAIT + 1))
> -               sleep 1
> -       done
> ...
>
> To summarize... all my efforts do not really work reliable at startup.
> So, please fix this soon.
>
> Thanks in advance.
>
> - Sedat -
>

What about this fix?
( It works on startup and does not slow-down my boot-process with
systemd (approx. 18sec). )

- Sedat -

--- 0.7.3/functions.sh  2010-05-02 10:41:33.000000000 +0200
+++ functions.sh        2011-04-17 10:38:21.621261733 +0200
@@ -279,10 +279,15 @@ init_wpa_supplicant () {
                return 1
        fi

-       if [ -n "$WPA_SUP_OMIT_PIDFILE" ]; then
-               wpa_msg verbose "creating sendsigs omission pidfile:
$WPA_SUP_OMIT_PIDFILE"
-               cat "$WPA_SUP_PIDFILE" > "$WPA_SUP_OMIT_PIDFILE"
-       fi
+       until [ -S "$WPA_CTRL_DIR/$WPA_IFACE" ]; do
+               if [ -n "$WPA_SUP_OMIT_PIDFILE" ]; then
+                       wpa_msg verbose "creating sendsigs omission
pidfile: $WPA_SUP_OMIT_PIDFILE"
+                       cat "$WPA_SUP_PIDFILE" > "$WPA_SUP_OMIT_PIDFILE"
+               else
+                       wpa_msg stderr "$WPA_SUP_BIN daemon could not
create sendsigs omission pidfile"
+                       return 1
+               fi
+       done
 }

 #####################################################################

- EOT -





More information about the Pkg-wpa-devel mailing list