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

« back to all changes in this revision

Viewing changes to debian/patches/wpa_supplicant-dbus-null-error.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
commit 8ee69e06336d65b15364f4db82d91775d0fe47c6
 
2
Author: Paul Stewart <pstew@google.com>
 
3
Date:   Sat Oct 9 17:29:51 2010 +0300
 
4
 
 
5
    dbus_new_handlers: Don't send NULL to dbus_message_new_error
 
6
    
 
7
    The new DBus API helper function wpas_dbus_error_unknown_error
 
8
    function can be called as a result of a failure within internal
 
9
    getter calls, which will call this function with a NULL message
 
10
    parameter.  However, dbus_message_new_error looks very unkindly
 
11
    (i.e, abort()) on a NULL message, so in this case, we should not
 
12
    call it.
 
13
    
 
14
    I've observed this course of events during a call to
 
15
    wpas_dbus_getter_bss_wpa with a faileld parse of the IE parameter.
 
16
    We got here through a call to fill_dict_with_properties which
 
17
    explicitly calls getters with a NULL message parameter.  Judging
 
18
    from the way it is called, this could easily occur if an AP sends
 
19
    out a malformed (or mis-received) probe response.  I usually run
 
20
    into this problem while driving through San Francisco, so I'm
 
21
    exposed to any number of base stations along this path.
 
22
 
 
23
diff --git a/wpa_supplicant/dbus/dbus_new_handlers.c b/wpa_supplicant/dbus/dbus_new_handlers.c
 
24
index 73f4e44..0ad51a0 100644
 
25
--- a/wpa_supplicant/dbus/dbus_new_handlers.c
 
26
+++ b/wpa_supplicant/dbus/dbus_new_handlers.c
 
27
@@ -117,6 +117,20 @@ static char * wpas_dbus_new_decompose_object_path(const char *path,
 
28
 DBusMessage * wpas_dbus_error_unknown_error(DBusMessage *message,
 
29
                                            const char *arg)
 
30
 {
 
31
+       /*
 
32
+        * This function can be called as a result of a failure
 
33
+        * within internal getter calls, which will call this function
 
34
+        * with a NULL message parameter.  However, dbus_message_new_error
 
35
+        * looks very unkindly (i.e, abort()) on a NULL message, so
 
36
+        * in this case, we should not call it.
 
37
+        */
 
38
+       if (message == NULL) {
 
39
+               wpa_printf(MSG_INFO, "dbus: wpas_dbus_error_unknown_error "
 
40
+                          "called with NULL message (arg=%s)",
 
41
+                          arg ? arg : "N/A");
 
42
+               return NULL;
 
43
+       }
 
44
+
 
45
        return dbus_message_new_error(message, WPAS_DBUS_ERROR_UNKNOWN_ERROR,
 
46
                                      arg);
 
47
 }