~ubuntu-branches/ubuntu/precise/wpasupplicant/precise-proposed

« back to all changes in this revision

Viewing changes to debian/patches/0011-pmkokc-PMKSA-Set-cur_pmksa-pointer-during-initial-associati.patch

  • Committer: Package Import Robot
  • Author(s): Mathieu Trudel-Lapierre
  • Date: 2013-06-12 15:57:50 UTC
  • Revision ID: package-import@ubuntu.com-20130612155750-go9lgylcef8n3f2f
Tags: 0.7.3-6ubuntu2.2
* Multiple patches to reduce the number of disconnections for WPA Enterprise
  roaming and Opportunistic Key Caching. (LP: #1187524)
* In debian/patches:
  0001-sme-fix-retry-after-auth-assoc-timeout-failure.patch,
  0002-sme-optimize-recovery-from-common-load-balancing-mechanisms.patch,
  0003-sme-blacklist-bss-on-first-failure-if-only-a-*.patch,
  0004-sme-extend-load-balancing-optimization-in-bss-blacklisting.patch,
  0005-sme-optimize-recovery-from-association-command-failures.patch,
  0006-sme-add-timers-for-authentication-and-association.patch,
  0007-sme-nl80211-set-cipher-suites.patch:
  Cherry-pick patches fixing SME (Session Management Entity) for the nl80211
  driver, which works as a basis for the OKC patches.
* In debian/patches:
  0001-pmkokc-Set-portValid-TRUE-on-association-for-driver-based-4.patch,
  0002-pmkokc-Clear-WPA-and-EAPOL-state-machine-config-pointer-on-.patch,
  0003-pmkokc-Clear-driver-PMKSA-cache-entry-on-PMKSA-cache-expira.patch,
  0004-pmkokc-Flush-PMKSA-cache-entries-and-invalidate-EAP-state-o.patch,
  0005-pmkokc-Fix-proactive_key_caching-configuration-to-WPA-code.patch,
  0006-pmkokc-RSN-Add-a-debug-message-when-considing-addition-of-O.patch,
  0007-pmkokc-Clear-OKC-based-PMKSA-caching-entries-if-PMK-is-chan.patch,
  0008-pmkokc-Move-wpa_sm_remove_pmkid-call-to-PMKSA-cache-entry-f.patch,
  0009-pmkokc-Use-PMKSA-cache-entries-with-only-a-single-network-c.patch,
  0010-pmkokc-PMKSA-Do-not-evict-active-cache-entry-when-adding-ne.patch,
  0011-pmkokc-PMKSA-Set-cur_pmksa-pointer-during-initial-associati.patch,
  0012-pmkokc-PMKSA-make-deauthentication-due-to-cache-entry-remov.patch,
  0013-pmkokc-PMKSA-update-current-cache-entry-due-to-association-.patch:
  Cherry-pick patches to properly do OKC (Opportunistic Key Caching) which
  helps maintaining connectivity on networks secured with WPA Enterprise,
  especially on nl80211-based drivers -- these patches require SME, and add
  or fix key caching and handling of the cache entries.
* debian/patches/force-enable-okc.patch: force Opportunistic Key Caching to
  be enabled.
* debian/patches/less-aggressive-roaming.patch: use less aggressive roaming
  settings to avoid switching to another AP unnecessarily, when the actual
  signal level difference is small.
* debian/patches/wpa_supplicant-dbus-null-error.patch: Don't send NULL to
  dbus_message_new_error().
* debian/patches/0001-nl80211-Fix-UNSPEC-signal-quality-reporting.patch: fix
  marking qual as invalid rather than signal level.
* debian/patches/wpa_supplicant-squelch-driver-disconnect-spam.patch: recover
  cleanly from streams of disconnect messages (like on iwl3945).
* debian/patches/wpa_supplicant-assoc-timeout.patch: increase association
  timeouts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
From a7f10d65f40939d855fd996374e465d7c55b797f Mon Sep 17 00:00:00 2001
 
2
From: Jouni Malinen <j@w1.fi>
 
3
Date: Fri, 10 Aug 2012 18:05:03 +0300
 
4
Subject: [PATCH] PMKSA: Set cur_pmksa pointer during initial association
 
5
 
 
6
cur_pmksa was left to NULL during the initial association. This can
 
7
result in unexpected behavior, e.g., in expiring PMKSA cache entries
 
8
since the current entry is not locked in that case. Fix this by updated
 
9
cur_pmksa when adding the initial PMKSA entry during msg 1/4 processing.
 
10
 
 
11
Signed-hostap: Jouni Malinen <j@w1.fi>
 
12
intended-for: hostap-1
 
13
---
 
14
 src/rsn_supp/wpa.c | 12 +++++++++---
 
15
 1 file changed, 9 insertions(+), 3 deletions(-)
 
16
 
 
17
diff --git a/src/rsn_supp/wpa.c b/src/rsn_supp/wpa.c
 
18
index c181c51..d7d7963 100644
 
19
--- a/src/rsn_supp/wpa.c
 
20
+++ b/src/rsn_supp/wpa.c
 
21
@@ -190,13 +190,16 @@ static int wpa_supplicant_get_pmk(struct wpa_sm *sm,
 
22
 #endif /* CONFIG_IEEE80211R */
 
23
                }
 
24
                if (res == 0) {
 
25
+                       struct rsn_pmksa_cache_entry *sa = NULL;
 
26
                        wpa_hexdump_key(MSG_DEBUG, "WPA: PMK from EAPOL state "
 
27
                                        "machines", sm->pmk, pmk_len);
 
28
                        sm->pmk_len = pmk_len;
 
29
                        if (sm->proto == WPA_PROTO_RSN) {
 
30
-                               pmksa_cache_add(sm->pmksa, sm->pmk, pmk_len,
 
31
-                                               src_addr, sm->own_addr,
 
32
-                                               sm->network_ctx, sm->key_mgmt);
 
33
+                               sa = pmksa_cache_add(sm->pmksa,
 
34
+                                                    sm->pmk, pmk_len,
 
35
+                                                    src_addr, sm->own_addr,
 
36
+                                                    sm->network_ctx,
 
37
+                                                    sm->key_mgmt);
 
38
                        }
 
39
                        if (!sm->cur_pmksa && pmkid &&
 
40
                            pmksa_cache_get(sm->pmksa, src_addr, pmkid, NULL))
 
41
@@ -207,6 +210,9 @@ static int wpa_supplicant_get_pmk(struct wpa_sm *sm,
 
42
                                           "matches with the PMKID");
 
43
                                abort_cached = 0;
 
44
                        }
 
45
+
 
46
+                       if (!sm->cur_pmksa)
 
47
+                               sm->cur_pmksa = sa;
 
48
                } else {
 
49
                        wpa_msg(sm->ctx->msg_ctx, MSG_WARNING,
 
50
                                "WPA: Failed to get master session key from "
 
51
-- 
 
52
1.7.11.2
 
53