mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-12-21 19:31:55 +00:00
Some checks failed
Build OpenWrt/uCentral images / build (cig_wf186h) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cig_wf186w) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cig_wf188n) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cig_wf189) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cig_wf196) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cybertan_eww631-a1) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cybertan_eww631-b1) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap101) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap102) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap104) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap105) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap111) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap112) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_oap101) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_oap101-6e) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_oap101e) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_oap101e-6e) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4x) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4x_2) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4x_3) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4x_w) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4xe) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4xi) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4xi_w) (push) Has been cancelled
Build OpenWrt/uCentral images / build (indio_um-305ax) (push) Has been cancelled
Build OpenWrt/uCentral images / build (sercomm_ap72tip) (push) Has been cancelled
Build OpenWrt/uCentral images / build (sonicfi_rap630c-311g) (push) Has been cancelled
Build OpenWrt/uCentral images / build (sonicfi_rap630w-211g) (push) Has been cancelled
Build OpenWrt/uCentral images / build (sonicfi_rap630w-311g) (push) Has been cancelled
Build OpenWrt/uCentral images / build (udaya_a6-id2) (push) Has been cancelled
Build OpenWrt/uCentral images / build (udaya_a6-od2) (push) Has been cancelled
Build OpenWrt/uCentral images / build (wallys_dr5018) (push) Has been cancelled
Build OpenWrt/uCentral images / build (wallys_dr6018) (push) Has been cancelled
Build OpenWrt/uCentral images / build (wallys_dr6018-v4) (push) Has been cancelled
Build OpenWrt/uCentral images / build (yuncore_ax820) (push) Has been cancelled
Build OpenWrt/uCentral images / build (yuncore_ax840) (push) Has been cancelled
Build OpenWrt/uCentral images / build (yuncore_fap640) (push) Has been cancelled
Build OpenWrt/uCentral images / build (yuncore_fap650) (push) Has been cancelled
Build OpenWrt/uCentral images / build (yuncore_fap655) (push) Has been cancelled
Build OpenWrt/uCentral images / trigger-testing (push) Has been cancelled
Build OpenWrt/uCentral images / create-x64_vm-ami (push) Has been cancelled
Signed-off-by: John Crispin <john@phrozen.org>
57 lines
1.4 KiB
Diff
57 lines
1.4 KiB
Diff
--- a/src/common/wpa_common.c
|
|
+++ b/src/common/wpa_common.c
|
|
@@ -2719,6 +2719,31 @@ u32 wpa_akm_to_suite(int akm)
|
|
}
|
|
|
|
|
|
+static void wpa_fixup_wpa_ie_rsn(u8 *assoc_ie, const u8 *wpa_msg_ie,
|
|
+ size_t rsn_ie_len)
|
|
+{
|
|
+ int pos, count;
|
|
+
|
|
+ pos = sizeof(struct rsn_ie_hdr) + RSN_SELECTOR_LEN;
|
|
+ if (rsn_ie_len < pos + 2)
|
|
+ return;
|
|
+
|
|
+ count = WPA_GET_LE16(wpa_msg_ie + pos);
|
|
+ pos += 2 + count * RSN_SELECTOR_LEN;
|
|
+ if (rsn_ie_len < pos + 2)
|
|
+ return;
|
|
+
|
|
+ count = WPA_GET_LE16(wpa_msg_ie + pos);
|
|
+ pos += 2 + count * RSN_SELECTOR_LEN;
|
|
+ if (rsn_ie_len < pos + 2)
|
|
+ return;
|
|
+
|
|
+ if (!assoc_ie[pos] && !assoc_ie[pos + 1] &&
|
|
+ (wpa_msg_ie[pos] || wpa_msg_ie[pos + 1]))
|
|
+ memcpy(&assoc_ie[pos], &wpa_msg_ie[pos], 2);
|
|
+}
|
|
+
|
|
+
|
|
int wpa_compare_rsn_ie(int ft_initial_assoc,
|
|
const u8 *ie1, size_t ie1len,
|
|
const u8 *ie2, size_t ie2len)
|
|
@@ -2726,8 +2751,19 @@ int wpa_compare_rsn_ie(int ft_initial_as
|
|
if (ie1 == NULL || ie2 == NULL)
|
|
return -1;
|
|
|
|
- if (ie1len == ie2len && os_memcmp(ie1, ie2, ie1len) == 0)
|
|
- return 0; /* identical IEs */
|
|
+ if (ie1len == ie2len) {
|
|
+ u8 *ie_tmp;
|
|
+
|
|
+ if (os_memcmp(ie1, ie2, ie1len) == 0)
|
|
+ return 0; /* identical IEs */
|
|
+
|
|
+ ie_tmp = alloca(ie1len);
|
|
+ memcpy(ie_tmp, ie1, ie1len);
|
|
+ wpa_fixup_wpa_ie_rsn(ie_tmp, ie2, ie1len);
|
|
+
|
|
+ if (os_memcmp(ie_tmp, ie2, ie1len) == 0)
|
|
+ return 0; /* only mismatch in RSN capabilties */
|
|
+ }
|
|
|
|
#ifdef CONFIG_IEEE80211R
|
|
if (ft_initial_assoc) {
|