FreeBSD Bugzilla – Attachment 235051 Details for
Bug 264238
wpa_supplicant 2.10 fails to associate to open secondary VAP when primary VAP is WPA
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch to have wpa_driver_bsd_associate() check for WLAN_EID_RSN IE before setting WPA
driver_bsd-check_for_WLAN_EID_RSN-3.diff (text/plain), 2.29 KB, created by
J.R. Oldroyd
on 2022-07-03 14:34:17 UTC
(
hide
)
Description:
patch to have wpa_driver_bsd_associate() check for WLAN_EID_RSN IE before setting WPA
Filename:
MIME Type:
Creator:
J.R. Oldroyd
Created:
2022-07-03 14:34:17 UTC
Size:
2.29 KB
patch
obsolete
>diff --git a/contrib/wpa/src/drivers/driver_bsd.c b/contrib/wpa/src/drivers/driver_bsd.c >index c455bc93103..a64d43dba66 100644 >--- a/contrib/wpa/src/drivers/driver_bsd.c >+++ b/contrib/wpa/src/drivers/driver_bsd.c >@@ -14,6 +14,7 @@ > #include "driver.h" > #include "eloop.h" > #include "common/ieee802_11_defs.h" >+#include "common/ieee802_11_common.h" > #include "common/wpa_common.h" > > #include <ifaddrs.h> >@@ -1208,6 +1209,8 @@ wpa_driver_bsd_associate(void *priv, struct wpa_driver_associate_params *params) > u32 mode; > int privacy; > int ret = 0; >+ const u8 *wpa_ie; >+ size_t wpa_ie_len; > > wpa_printf(MSG_DEBUG, > "%s: ssid '%.*s' wpa ie len %u pairwise %u group %u key mgmt %u" >@@ -1256,23 +1259,30 @@ wpa_driver_bsd_associate(void *priv, struct wpa_driver_associate_params *params) > ret = -1; > if (wpa_driver_bsd_set_auth_alg(drv, params->auth_alg) < 0) > ret = -1; >- /* XXX error handling is wrong but unclear what to do... */ >- if (wpa_driver_bsd_set_wpa_ie(drv, params->wpa_ie, params->wpa_ie_len) < 0) >- return -1; >- >- privacy = !(params->pairwise_suite == WPA_CIPHER_NONE && >- params->group_suite == WPA_CIPHER_NONE && >- params->key_mgmt_suite == WPA_KEY_MGMT_NONE && >- params->wpa_ie_len == 0); >- wpa_printf(MSG_DEBUG, "%s: set PRIVACY %u", __func__, privacy); >- >- if (set80211param(drv, IEEE80211_IOC_PRIVACY, privacy) < 0) >- return -1; > >- if (params->wpa_ie_len && >- set80211param(drv, IEEE80211_IOC_WPA, >- params->wpa_ie[0] == WLAN_EID_RSN ? 2 : 1) < 0) >- return -1; >+ if (params->wpa_ie_len) { >+ wpa_ie = get_ie(params->wpa_ie, params->wpa_ie_len, WLAN_EID_RSN); >+ if (wpa_ie) { >+ wpa_ie_len = wpa_ie[1] ? wpa_ie[1] + 2 : 0; >+ /* XXX error handling is wrong but unclear what to do... */ >+ if (wpa_driver_bsd_set_wpa_ie(drv, wpa_ie, wpa_ie_len) < 0) >+ return -1; >+ >+ privacy = !(params->pairwise_suite == WPA_CIPHER_NONE && >+ params->group_suite == WPA_CIPHER_NONE && >+ params->key_mgmt_suite == WPA_KEY_MGMT_NONE); >+ wpa_printf(MSG_DEBUG, "%s: set PRIVACY %u", __func__, >+ privacy); >+ >+ if (set80211param(drv, IEEE80211_IOC_PRIVACY, privacy) < 0) >+ return -1; >+ >+ if (wpa_ie_len && >+ set80211param(drv, IEEE80211_IOC_WPA, >+ wpa_ie[0] == WLAN_EID_RSN ? 2 : 1) < 0) >+ return -1; >+ } >+ } > > /* > * NB: interface must be marked UP for association
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 264238
:
234405
|
234407
|
234478
|
234491
|
234669
|
234682
|
234695
|
234745
|
234801
|
234807
|
234808
|
234816
|
234848
|
234857
|
234903
|
234915
|
235029
|
235030
|
235049
|
235050
|
235051
|
235053
|
235055