FreeBSD Bugzilla – Attachment 235050 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-2.diff (text/plain), 1.96 KB, created by
J.R. Oldroyd
on 2022-07-03 14:02:02 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:02:02 UTC
Size:
1.96 KB
patch
obsolete
>diff --git a/contrib/wpa/src/drivers/driver_bsd.c b/contrib/wpa/src/drivers/driver_bsd.c >index c455bc93103..3f39815681d 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> >@@ -1256,23 +1257,27 @@ 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 (params->wpa_ie_len && get_ie(params->wpa_ie, params->wpa_ie_len, >+ WLAN_EID_RSN)) { >+ /* 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; > >- if (set80211param(drv, IEEE80211_IOC_PRIVACY, privacy) < 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 (params->wpa_ie_len && >- set80211param(drv, IEEE80211_IOC_WPA, >- params->wpa_ie[0] == WLAN_EID_RSN ? 2 : 1) < 0) >- return -1; >+ 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; >+ } > > /* > * 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