From: Tim Gardner <tim.gardner@canonical.com>
To: linux-wireless <linux-wireless@vger.kernel.org>
Cc: kernel-team@lists.ubuntu.com,
Ben Collins <ben.collins@ubuntu.com>,
mjg59@cavan.codon.org.uk
Subject: [PATCH] Fix NetworkManager/wpa_supplicant race condition
Date: Wed, 18 Apr 2007 10:40:03 -0600 [thread overview]
Message-ID: <462649E3.4000208@canonical.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 710 bytes --]
This patch fixes an assumption made by wpa_supplicant. Any time
wpa_supplicant requests to set an ESSID (e.g., associate), it expects an
event notifying that association has completed. If the Networkmanager
has already setup an association, such as for an open auth AP, then the
request to associate by wpa_supplicant will be ignored.
If Networkmanager is requested to restart the connection, such as by
clicking on the SSID, then wpa_supplicant is allowed to build the
association from scratch, which always works.
https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.20/+bug/103768
By always emitting this event, am I causing any unintended side effects?
rtg
--
Tim Gardner tim.gardner@ubuntu.com
[-- Attachment #2: bug_103768 --]
[-- Type: text/plain, Size: 888 bytes --]
diff --git a/net/ieee80211/softmac/ieee80211softmac_wx.c b/net/ieee80211/softmac/ieee80211softmac_wx.c
index fa2f7da..cc2e8ba 100644
--- a/net/ieee80211/softmac/ieee80211softmac_wx.c
+++ b/net/ieee80211/softmac/ieee80211softmac_wx.c
@@ -88,6 +88,13 @@ ieee80211softmac_wx_set_essid(struct net_device *net_dev,
!memcmp(n->essid.data, extra, n->essid.len)) {
dprintk(KERN_INFO PFX "Already associating or associated to "MAC_FMT"\n",
MAC_ARG(sm->associnfo.bssid));
+ /* wpa_supplicant expects an association event, regardless of prior
+ * association state. If associating, then the associnfo.work task
+ * will send the appropriate event.
+ */
+ if (sm->associnfo.associated)
+ ieee80211softmac_call_events_locked(sm,
+ IEEE80211SOFTMAC_EVENT_ASSOCIATED, n);
goto out;
} else {
dprintk(KERN_INFO PFX "Canceling existing associate request!\n");
next reply other threads:[~2007-04-18 17:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-18 16:40 Tim Gardner [this message]
2007-04-18 17:22 ` [PATCH] Fix NetworkManager/wpa_supplicant race condition Dan Williams
2007-04-18 19:18 ` Tim Gardner
2007-04-19 3:04 ` Dan Williams
2007-04-19 15:51 ` Tim Gardner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=462649E3.4000208@canonical.com \
--to=tim.gardner@canonical.com \
--cc=ben.collins@ubuntu.com \
--cc=kernel-team@lists.ubuntu.com \
--cc=linux-wireless@vger.kernel.org \
--cc=mjg59@cavan.codon.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).