Re: [PATCH v2 05/17] MLD STA: set MLO connection info to wpa_sm

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


On 10/3/2022 5:59 PM, Peer, Ilan wrote:

+		ie = mlo->links[i].ap_rsne;
+		len = mlo->links[i].ap_rsne_len;
+		os_free(sm->mlo.links[i].ap_rsne);
+		if (ie == NULL || len == 0) {
I think I asked this before: I do not think that it is valid to have an MLD connection without RSN.

the RSNE mandate check is done before calling this API in wpa_sm_set_ml_info()

Here looping through all the link indexes to make sure previously allocated per link RSNE/RSNXE info is freed.

+			wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG,
+				"WPA: clearing MLO link[%u] AP RSNE", i);
+			sm->mlo.links[i].ap_rsne = NULL;
+			sm->mlo.links[i].ap_rsne_len = 0;
This can be done unconditionally (also for the rsnxe).

I think it's fine to skip this for the links with valid IEs since we anyway going to set them in else part

+	for (i = 0; i < MAX_NUM_MLD_LINKS; i++) {
+		struct wpa_bss *bss;
+		if (!(mlo.req_links & BIT(i)))
+			continue;
+		if (mlo.setup_links & BIT(i)) {
+			bss = wpa_s->links[i].bss;
+		} else {
+			bss = wpa_supplicant_get_new_bss(wpa_s,
+							 resp_links.addr[i]);
+			if (!bss) {
Since setup links should be subset of requested links, why not use 'bss = wpa_s->links[i].bss' as well?

"wpa_s->links" only caching setup links info. requested links info needed only in wpa_sm till EAPOL completed. So, I think it's fine to maintain just setup links info in "wpa_s"

I will fix remaining comments in v3 series. Thanks.

- veeru

Hostap mailing list

[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux