[pkg-wpa-devel] r897 - in /wpasupplicant/trunk: debian/changelog wpa_supplicant/ChangeLog wpa_supplicant/ctrl_iface_unix.c
kelmo-guest at users.alioth.debian.org
kelmo-guest at users.alioth.debian.org
Sun Nov 18 07:00:36 UTC 2007
Author: kelmo-guest
Date: Sun Nov 18 07:00:35 2007
New Revision: 897
URL: http://svn.debian.org/wsvn/pkg-wpa/?sc=1&rev=897
Log:
fetch todays git
Modified:
wpasupplicant/trunk/debian/changelog
wpasupplicant/trunk/wpa_supplicant/ChangeLog
wpasupplicant/trunk/wpa_supplicant/ctrl_iface_unix.c
Modified: wpasupplicant/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-wpa/wpasupplicant/trunk/debian/changelog?rev=897&op=diff
==============================================================================
--- wpasupplicant/trunk/debian/changelog (original)
+++ wpasupplicant/trunk/debian/changelog Sun Nov 18 07:00:35 2007
@@ -1,4 +1,4 @@
-wpasupplicant (0.6.1~git20071109-1) UNRELEASED; urgency=low
+wpasupplicant (0.6.1~git20071118-1) UNRELEASED; urgency=low
* New upstream git snapshot.
- support for dbus >= 1.1.1 dbus_watch_get_unix_fd() api
@@ -32,7 +32,7 @@
has ensued. If the interface is not recorded in ifupdown's state file
attempt reassociation. (Closes: #428304).
- -- Kel Modderman <kel at otaku42.de> Fri, 09 Nov 2007 21:11:50 +1000
+ -- Kel Modderman <kel at otaku42.de> Sun, 18 Nov 2007 16:55:20 +1000
wpasupplicant (0.6.0-4) unstable; urgency=low
Modified: wpasupplicant/trunk/wpa_supplicant/ChangeLog
URL: http://svn.debian.org/wsvn/pkg-wpa/wpasupplicant/trunk/wpa_supplicant/ChangeLog?rev=897&op=diff
==============================================================================
--- wpasupplicant/trunk/wpa_supplicant/ChangeLog (original)
+++ wpasupplicant/trunk/wpa_supplicant/ChangeLog Sun Nov 18 07:00:35 2007
@@ -21,6 +21,9 @@
* fixed an integer overflow issue in the ASN.1 parser used by the
(experimental) internal TLS implementation to avoid a potential
buffer read overflow
+ * fixed a race condition with -W option (wait for a control interface
+ monitor before starting) that could have caused the first messages to
+ be lost
2007-05-28 - v0.6.0
* added network configuration parameter 'frequency' for setting
Modified: wpasupplicant/trunk/wpa_supplicant/ctrl_iface_unix.c
URL: http://svn.debian.org/wsvn/pkg-wpa/wpasupplicant/trunk/wpa_supplicant/ctrl_iface_unix.c?rev=897&op=diff
==============================================================================
--- wpasupplicant/trunk/wpa_supplicant/ctrl_iface_unix.c (original)
+++ wpasupplicant/trunk/wpa_supplicant/ctrl_iface_unix.c Sun Nov 18 07:00:35 2007
@@ -532,9 +532,42 @@
void wpa_supplicant_ctrl_iface_wait(struct ctrl_iface_priv *priv)
{
- wpa_printf(MSG_DEBUG, "CTRL_IFACE - %s - wait for monitor",
- priv->wpa_s->ifname);
- eloop_wait_for_read_sock(priv->sock);
+ char buf[256];
+ int res;
+ struct sockaddr_un from;
+ socklen_t fromlen = sizeof(from);
+
+ for (;;) {
+ wpa_printf(MSG_DEBUG, "CTRL_IFACE - %s - wait for monitor to "
+ "attach", priv->wpa_s->ifname);
+ eloop_wait_for_read_sock(priv->sock);
+
+ res = recvfrom(priv->sock, buf, sizeof(buf) - 1, 0,
+ (struct sockaddr *) &from, &fromlen);
+ if (res < 0) {
+ perror("recvfrom(ctrl_iface)");
+ continue;
+ }
+ buf[res] = '\0';
+
+ if (os_strcmp(buf, "ATTACH") == 0) {
+ /* handle ATTACH signal of first monitor interface */
+ if (!wpa_supplicant_ctrl_iface_attach(priv, &from,
+ fromlen)) {
+ sendto(priv->sock, "OK\n", 3, 0,
+ (struct sockaddr *) &from, fromlen);
+ /* OK to continue */
+ return;
+ } else {
+ sendto(priv->sock, "FAIL\n", 5, 0,
+ (struct sockaddr *) &from, fromlen);
+ }
+ } else {
+ /* return FAIL for all other signals */
+ sendto(priv->sock, "FAIL\n", 5, 0,
+ (struct sockaddr *) &from, fromlen);
+ }
+ }
}
More information about the Pkg-wpa-devel
mailing list