diff --git a/packages/network/wpa_supplicant/patches/wpa_supplicant-1.0-assoc-timeout.patch b/packages/network/wpa_supplicant/patches/wpa_supplicant-1.0-assoc-timeout.patch new file mode 100644 index 0000000000..c3b3568c6b --- /dev/null +++ b/packages/network/wpa_supplicant/patches/wpa_supplicant-1.0-assoc-timeout.patch @@ -0,0 +1,16 @@ +diff -up wpa_supplicant-0.7.3/wpa_supplicant/wpa_supplicant.c.assoc-timeout wpa_supplicant-0.7.3/wpa_supplicant/wpa_supplicant.c +--- wpa_supplicant-0.7.3/wpa_supplicant/wpa_supplicant.c.assoc-timeout 2010-09-07 10:43:39.000000000 -0500 ++++ wpa_supplicant-0.7.3/wpa_supplicant/wpa_supplicant.c 2010-12-07 18:57:45.163457000 -0600 +@@ -1262,10 +1262,10 @@ void wpa_supplicant_associate(struct wpa + + if (assoc_failed) { + /* give IBSS a bit more time */ +- timeout = ssid->mode == WPAS_MODE_IBSS ? 10 : 5; ++ timeout = ssid->mode == WPAS_MODE_IBSS ? 20 : 10; + } else if (wpa_s->conf->ap_scan == 1) { + /* give IBSS a bit more time */ +- timeout = ssid->mode == WPAS_MODE_IBSS ? 20 : 10; ++ timeout = ssid->mode == WPAS_MODE_IBSS ? 20 : 20; + } + wpa_supplicant_req_auth_timeout(wpa_s, timeout, 0); + } diff --git a/packages/network/wpa_supplicant/patches/wpa_supplicant-1.0-dbus-service-file-args.patch b/packages/network/wpa_supplicant/patches/wpa_supplicant-1.0-dbus-service-file-args.patch new file mode 100644 index 0000000000..b7478dad83 --- /dev/null +++ b/packages/network/wpa_supplicant/patches/wpa_supplicant-1.0-dbus-service-file-args.patch @@ -0,0 +1,20 @@ +diff -up wpa_supplicant-0.7.3/wpa_supplicant/dbus/fi.w1.wpa_supplicant1.service.in.fedora wpa_supplicant-0.7.3/wpa_supplicant/dbus/fi.w1.wpa_supplicant1.service.in +--- wpa_supplicant-0.7.3/wpa_supplicant/dbus/fi.w1.wpa_supplicant1.service.in.fedora 2008-03-02 20:58:35.000000000 -0500 ++++ wpa_supplicant-0.7.3/wpa_supplicant/dbus/fi.w1.wpa_supplicant1.service.in 2008-03-02 20:58:41.000000000 -0500 +@@ -1,5 +1,5 @@ + [D-BUS Service] + Name=fi.w1.wpa_supplicant1 +-Exec=@BINDIR@/wpa_supplicant -u ++Exec=@BINDIR@/wpa_supplicant -B -u -f /var/log/wpa_supplicant.log -c /etc/wpa_supplicant/wpa_supplicant.conf -P /var/run/wpa_supplicant.pid + User=root + SystemdService=wpa_supplicant.service +diff -up wpa_supplicant-0.7.3/wpa_supplicant/dbus/fi.epitest.hostap.WPASupplicant.service.in.fedora wpa_supplicant-0.7.3/wpa_supplicant/dbus/fi.epitest.hostap.WPASupplicant.service.in +--- wpa_supplicant-0.7.3/wpa_supplicant/dbus/fi.epitest.hostap.WPASupplicant.service.in.fedora 2008-03-02 20:58:35.000000000 -0500 ++++ wpa_supplicant-0.7.3/wpa_supplicant/dbus/fi.epitest.hostap.WPASupplicant.service.in 2008-03-02 20:58:41.000000000 -0500 +@@ -1,5 +1,5 @@ + [D-BUS Service] + Name=fi.epitest.hostap.WPASupplicant +-Exec=@BINDIR@/wpa_supplicant -u ++Exec=@BINDIR@/wpa_supplicant -B -u -f /var/log/wpa_supplicant.log -c /etc/wpa_supplicant/wpa_supplicant.conf -P /var/run/wpa_supplicant.pid + User=root + SystemdService=wpa_supplicant.service diff --git a/packages/network/wpa_supplicant/patches/wpa_supplicant-1.0-flush-debug-output.patch b/packages/network/wpa_supplicant/patches/wpa_supplicant-1.0-flush-debug-output.patch new file mode 100644 index 0000000000..a686851867 --- /dev/null +++ b/packages/network/wpa_supplicant/patches/wpa_supplicant-1.0-flush-debug-output.patch @@ -0,0 +1,49 @@ +--- wpa_supplicant-0.6.3/src/utils/wpa_debug.c.flush-debug 2007-07-30 23:15:34.000000000 -0400 ++++ wpa_supplicant-0.6.3/src/utils/wpa_debug.c 2007-07-30 23:17:06.000000000 -0400 +@@ -157,6 +157,7 @@ void wpa_debug_print_timestamp(void) + if (out_file) { + fprintf(out_file, "%ld.%06u: ", (long) tv.sec, + (unsigned int) tv.usec); ++ fflush(out_file); + } else + #endif /* CONFIG_DEBUG_FILE */ + printf("%ld.%06u: ", (long) tv.sec, (unsigned int) tv.usec); +@@ -185,6 +186,7 @@ void wpa_printf(int level, char *fmt, .. + if (out_file) { + vfprintf(out_file, fmt, ap); + fprintf(out_file, "\n"); ++ fflush(out_file); + } else { + #endif /* CONFIG_DEBUG_FILE */ + vprintf(fmt, ap); +@@ -217,6 +219,7 @@ static void _wpa_hexdump(int level, cons + fprintf(out_file, " [REMOVED]"); + } + fprintf(out_file, "\n"); ++ fflush(out_file); + } else { + #endif /* CONFIG_DEBUG_FILE */ + printf("%s - hexdump(len=%lu):", title, (unsigned long) len); +@@ -262,12 +265,14 @@ static void _wpa_hexdump_ascii(int level + fprintf(out_file, + "%s - hexdump_ascii(len=%lu): [REMOVED]\n", + title, (unsigned long) len); ++ fflush(out_file); + return; + } + if (buf == NULL) { + fprintf(out_file, + "%s - hexdump_ascii(len=%lu): [NULL]\n", + title, (unsigned long) len); ++ fflush(out_file); + return; + } + fprintf(out_file, "%s - hexdump_ascii(len=%lu):\n", +@@ -292,6 +297,7 @@ static void _wpa_hexdump_ascii(int level + pos += llen; + len -= llen; + } ++ fflush(out_file); + } else { + #endif /* CONFIG_DEBUG_FILE */ + if (!show) { diff --git a/packages/network/wpa_supplicant/patches/wpa_supplicant-1.0-libnl3-includes.patch b/packages/network/wpa_supplicant/patches/wpa_supplicant-1.0-libnl3-includes.patch new file mode 100644 index 0000000000..5d8903906a --- /dev/null +++ b/packages/network/wpa_supplicant/patches/wpa_supplicant-1.0-libnl3-includes.patch @@ -0,0 +1,12 @@ +diff -up wpa_supplicant-1.0-rc2/src/drivers/drivers.mak.foo wpa_supplicant-1.0-rc2/src/drivers/drivers.mak +--- wpa_supplicant-1.0-rc2/src/drivers/drivers.mak.foo 2012-03-02 16:11:43.176448714 -0600 ++++ wpa_supplicant-1.0-rc2/src/drivers/drivers.mak 2012-03-02 16:12:29.759866341 -0600 +@@ -48,7 +48,7 @@ NEED_RFKILL=y + ifdef CONFIG_LIBNL32 + DRV_LIBS += -lnl-3 + DRV_LIBS += -lnl-genl-3 +- DRV_CFLAGS += -DCONFIG_LIBNL20 ++ DRV_CFLAGS += -DCONFIG_LIBNL20 `pkg-config --cflags libnl-3.0` + else + ifdef CONFIG_LIBNL_TINY + DRV_LIBS += -lnl-tiny diff --git a/packages/network/wpa_supplicant/patches/wpa_supplicant-1.0-openssl-more-algs.patch b/packages/network/wpa_supplicant/patches/wpa_supplicant-1.0-openssl-more-algs.patch new file mode 100644 index 0000000000..b44c463c53 --- /dev/null +++ b/packages/network/wpa_supplicant/patches/wpa_supplicant-1.0-openssl-more-algs.patch @@ -0,0 +1,16 @@ +diff -up wpa_supplicant-0.7.3/src/crypto/tls_openssl.c.more-openssl-algs wpa_supplicant-0.7.3/src/crypto/tls_openssl.c +--- wpa_supplicant-0.7.3/src/crypto/tls_openssl.c.more-openssl-algs 2010-09-07 10:43:39.000000000 -0500 ++++ wpa_supplicant-0.7.3/src/crypto/tls_openssl.c 2010-12-08 10:01:02.967664004 -0600 +@@ -710,6 +710,11 @@ void * tls_init(const struct tls_config + #endif /* OPENSSL_FIPS */ + #endif /* CONFIG_FIPS */ + SSL_load_error_strings(); ++ /* Only add potentially weak hashes and encryption algorithms ++ * when FIPS mode is not enabled. ++ */ ++ if (!conf || !conf->fips_mode) ++ OpenSSL_add_all_algorithms(); + SSL_library_init(); + #if (OPENSSL_VERSION_NUMBER >= 0x0090800fL) && !defined(OPENSSL_NO_SHA256) + EVP_add_digest(EVP_sha256()); + diff --git a/packages/network/wpa_supplicant/patches/wpa_supplicant-1.0-quiet-scan-results-message.patch b/packages/network/wpa_supplicant/patches/wpa_supplicant-1.0-quiet-scan-results-message.patch new file mode 100644 index 0000000000..5bb36a49c3 --- /dev/null +++ b/packages/network/wpa_supplicant/patches/wpa_supplicant-1.0-quiet-scan-results-message.patch @@ -0,0 +1,13 @@ +diff -up wpa_supplicant-0.6.7/wpa_supplicant/events.c.scan-results-msg wpa_supplicant-0.6.7/wpa_supplicant/events.c +--- wpa_supplicant-0.6.7/wpa_supplicant/events.c.scan-results-msg 2009-01-30 12:08:34.000000000 -0500 ++++ wpa_supplicant-0.6.7/wpa_supplicant/events.c 2009-01-30 12:08:37.000000000 -0500 +@@ -911,7 +911,7 @@ static void wpa_supplicant_event_scan_re + } + + wpa_dbg(wpa_s, MSG_DEBUG, "New scan results available"); +- wpa_msg_ctrl(wpa_s, MSG_INFO, WPA_EVENT_SCAN_RESULTS); ++ wpa_msg_ctrl(wpa_s, MSG_DEBUG, WPA_EVENT_SCAN_RESULTS); + wpas_notify_scan_results(wpa_s); + + wpas_notify_scan_done(wpa_s, 1); + diff --git a/packages/network/wpa_supplicant/patches/wpa_supplicant-1.0-squelch-driver-disconnect-spam.patch b/packages/network/wpa_supplicant/patches/wpa_supplicant-1.0-squelch-driver-disconnect-spam.patch new file mode 100644 index 0000000000..f53a41829c --- /dev/null +++ b/packages/network/wpa_supplicant/patches/wpa_supplicant-1.0-squelch-driver-disconnect-spam.patch @@ -0,0 +1,96 @@ +diff -up wpa_supplicant-0.6.8/wpa_supplicant/events.c.disconnect-spam wpa_supplicant-0.6.8/wpa_supplicant/events.c +--- wpa_supplicant-0.6.8/wpa_supplicant/events.c.disconnect-spam 2010-05-06 18:10:51.348288705 -0700 ++++ wpa_supplicant-0.6.8/wpa_supplicant/events.c 2010-05-06 18:10:51.356288887 -0700 +@@ -1302,6 +1302,15 @@ static void wpa_supplicant_event_disasso + wpa_s->keys_cleared = 0; + wpa_clear_keys(wpa_s, wpa_s->bssid); + } ++ ++ if (wpa_s->wpa_state == WPA_DISCONNECTED) { ++ wpa_s->disconnect_count++; ++ if (!eloop_is_timeout_registered(wpa_disconnect_spam_handle, wpa_s, NULL)) { ++ eloop_register_timeout(6, 0, wpa_disconnect_spam_handle, wpa_s, NULL); ++ wpa_printf(MSG_DEBUG, "%s: scheduled DISCONNECT spam handler", __FUNCTION__); ++ } ++ } ++ + wpa_supplicant_mark_disassoc(wpa_s); + + if (authenticating && (wpa_s->drv_flags & WPA_DRIVER_FLAGS_SME)) +diff -up wpa_supplicant-0.6.8/wpa_supplicant/wpa_supplicant.c.disconnect-spam wpa_supplicant-0.6.8/wpa_supplicant/wpa_supplicant.c +--- wpa_supplicant-0.6.8/wpa_supplicant/wpa_supplicant.c.disconnect-spam 2010-05-06 18:10:51.340288662 -0700 ++++ wpa_supplicant-0.6.8/wpa_supplicant/wpa_supplicant.c 2010-05-06 18:12:06.090413976 -0700 +@@ -382,6 +382,9 @@ static void wpa_supplicant_cleanup(struc + + wpa_supplicant_cancel_scan(wpa_s); + wpa_supplicant_cancel_auth_timeout(wpa_s); ++ if (eloop_is_timeout_registered(wpa_disconnect_spam_handle, wpa_s, NULL)) ++ eloop_cancel_timeout(wpa_disconnect_spam_handle, wpa_s, NULL); ++ + eloop_cancel_timeout(wpa_supplicant_stop_countermeasures, wpa_s, NULL); + #ifdef CONFIG_DELAYED_MIC_ERROR_REPORT + eloop_cancel_timeout(wpa_supplicant_delayed_mic_error_report, +@@ -461,6 +464,23 @@ const char * wpa_supplicant_state_txt(in + #endif /* CONFIG_BGSCAN */ + + ++void wpa_disconnect_spam_handle(void *eloop_ctx, void *timeout_ctx) ++{ ++ struct wpa_supplicant *wpa_s = eloop_ctx; ++ const u8 bssid[ETH_ALEN] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; ++ ++ wpa_printf(MSG_DEBUG, "%s: %d disconnect events in 6 seconds", ++ __FUNCTION__, wpa_s->disconnect_count); ++ ++ if (wpa_s->disconnect_count >= 3) { ++ wpa_printf(MSG_DEBUG, "%s: forcing SSID/BSSID reset", __FUNCTION__); ++ wpa_drv_disassociate(wpa_s, bssid, WLAN_REASON_DEAUTH_LEAVING); ++ wpa_supplicant_req_scan(wpa_s, 1, 0); ++ } ++ wpa_s->disconnect_count = 0; ++} ++ ++ + /** + * wpa_supplicant_set_state - Set current connection state + * @wpa_s: Pointer to wpa_supplicant data +@@ -478,6 +498,18 @@ void wpa_supplicant_set_state(struct wpa + if (state != WPA_SCANNING) + wpa_supplicant_notify_scanning(wpa_s, 0); + ++ if (state != WPA_DISCONNECTED && state != WPA_SCANNING) { ++ /* If the state isn't disconnected, cancel any registered ++ * disconnect spam handler, which should only live while ++ * disconnect events are coming in quickly. ++ */ ++ wpa_s->disconnect_count = 0; ++ if (eloop_is_timeout_registered(wpa_disconnect_spam_handle, wpa_s, NULL)) { ++ wpa_printf(MSG_DEBUG, "%s: canceling DISCONNECT spam handler", __FUNCTION__); ++ eloop_cancel_timeout(wpa_disconnect_spam_handle, wpa_s, NULL); ++ } ++ } ++ + if (state == WPA_COMPLETED && wpa_s->new_connection) { + #if defined(CONFIG_CTRL_IFACE) || !defined(CONFIG_NO_STDOUT_DEBUG) + struct wpa_ssid *ssid = wpa_s->current_ssid; +diff -up wpa_supplicant-0.6.8/wpa_supplicant/wpa_supplicant_i.h.disconnect-spam wpa_supplicant-0.6.8/wpa_supplicant/wpa_supplicant_i.h +--- wpa_supplicant-0.6.8/wpa_supplicant/wpa_supplicant_i.h.disconnect-spam 2009-02-15 10:00:00.000000000 -0800 ++++ wpa_supplicant-0.6.8/wpa_supplicant/wpa_supplicant_i.h 2010-05-06 18:10:51.358288792 -0700 +@@ -397,6 +397,8 @@ struct wpa_supplicant { + int wps_success; /* WPS success event received */ + struct wps_er *wps_er; + int blacklist_cleared; ++ ++ int disconnect_count; + + struct wpabuf *pending_eapol_rx; + struct os_time pending_eapol_rx_time; +@@ -461,6 +463,7 @@ void wpa_clear_keys(struct wpa_supplican + int sec, int usec); + void wpa_supplicant_set_state(struct wpa_supplicant *wpa_s, + enum wpa_states state); ++void wpa_disconnect_spam_handle(void *eloop_ctx, void *timeout_ctx); + struct wpa_ssid * wpa_supplicant_get_ssid(struct wpa_supplicant *wpa_s); + const char * wpa_supplicant_get_eap_mode(struct wpa_supplicant *wpa_s); + void wpa_supplicant_cancel_auth_timeout(struct wpa_supplicant *wpa_s); + diff --git a/packages/network/wpa_supplicant/patches/wpa_supplicant-1.0-wpagui-getopt.patch b/packages/network/wpa_supplicant/patches/wpa_supplicant-1.0-wpagui-getopt.patch new file mode 100644 index 0000000000..ed1930b217 --- /dev/null +++ b/packages/network/wpa_supplicant/patches/wpa_supplicant-1.0-wpagui-getopt.patch @@ -0,0 +1,14 @@ +diff -up wpa_supplicant-1.0-rc1/wpa_supplicant/wpa_gui-qt4/wpagui.cpp.getopt wpa_supplicant-1.0-rc1/wpa_supplicant/wpa_gui-qt4/wpagui.cpp +--- wpa_supplicant-1.0-rc1/wpa_supplicant/wpa_gui-qt4/wpagui.cpp.getopt 2012-01-10 16:28:43.451307760 -0600 ++++ wpa_supplicant-1.0-rc1/wpa_supplicant/wpa_gui-qt4/wpagui.cpp 2012-01-10 16:28:53.999175893 -0600 +@@ -12,10 +12,7 @@ + * See README and COPYING for more details. + */ + +-#ifdef __MINGW32__ +-/* Need to get getopt() */ + #include +-#endif + + #ifdef CONFIG_NATIVE_WINDOWS + #include