Hello Bob, Thank you for your updates on the patches. I made further testing with my devices and found some unlucky case for mesh peerings. Sometimes mesh STAs can not establish peering, i.e., after one of the mesh STAs reboots.
In my view, the following change helps in mitigating this problem. ---- diff --git a/wpa_supplicant/mesh_mpm.c b/wpa_supplicant/mesh_mpm.c index 9ac7ea2..c7c08dd 100644 --- a/wpa_supplicant/mesh_mpm.c +++ b/wpa_supplicant/mesh_mpm.c @@ -841,15 +849,27 @@ void mesh_mpm_action_rx(struct wpa_supplicant *wpa_s, break; case PLINK_CONFIRM: - if (!plink_free_count() || - (sta->my_lid != llid || sta->peer_lid != plid)) - event = CNF_IGNR; - else + if (sta->plink_state == PLINK_OPEN_RCVD){ + if (!plink_free_count() || + (sta->my_lid != llid || sta->peer_lid != plid)) { + event = CNF_RJCT; + }else{ + event = CNF_ACPT; + } + }else if (sta->plink_state == PLINK_OPEN_SENT){ + if (!plink_free_count() || sta->my_lid != llid ) { + event = CNF_RJCT; + }else{ + sta->peer_lid = plid; + event = CNF_ACPT; + } + }else{ event = CNF_ACPT; + } break; case PLINK_CLOSE: ---- When a STA receives PLINK_CONFIRM frame, sta->peer_lid value might not be set appropriately depending on the plink_state that the STA is in. Particularly, when the sta->plink_state == PLINK_OPEN_SENT, it is possible that the STA have not received plink frames from the peer yet. In such case, sta->peer_lid contains incorrect value and the event end up with CNF_RJCT. To avoid this situation, I think that the event value should be set determining the sta->plink_state. I found the similar code in the Linux kernel implementation of mesh plink frame processing, net/mac80211/mesh_plink.c, void mesh_rx_plink_frame(). Ideally, the plink frame should be handled in the same way in the kernel version as well. Hope this helps. -- Yu
_______________________________________________ Devel mailing list Devel@lists.open80211s.org http://lists.open80211s.org/cgi-bin/mailman/listinfo/devel