]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
WPS: Drop responses from ER to a STA that is not in WPS protocol
authorJouni Malinen <jouni@qca.qualcomm.com>
Fri, 12 Aug 2011 08:58:32 +0000 (11:58 +0300)
committerJouni Malinen <j@w1.fi>
Fri, 12 Aug 2011 08:58:32 +0000 (11:58 +0300)
If an ER tries to send a message to a STA that is not in the middle
of WPS protocol, do not try to deliver that. This can help with issues
where an ER takes long time to reply to M1 and another Registrar has
already completed negotiation.

src/ap/wps_hostapd.c

index ff1048904aa03f5712e0318cec1f513ea0783a33..ebafc8660ff3599c687e74cd86cb13cb8eb1f092 100644 (file)
@@ -1188,7 +1188,7 @@ static int hostapd_rx_req_put_wlan_response(
        }
 #endif /* CONFIG_WPS_STRICT */
 
-       if (!sta) {
+       if (!sta || !(sta->flags & WLAN_STA_WPS)) {
                wpa_printf(MSG_DEBUG, "WPS UPnP: No matching STA found");
                return 0;
        }