WPS 2.0: Add support for AuthorizedMACs attribute

Advertize list of authorized enrollee MAC addresses in Beacon and
Probe Response frames and use these when selecting the AP. In order
to provide the list, the enrollee MAC address should be specified
whenever adding a new PIN. In addition, add UUID-R into
SetSelectedRegistrar action to make it potentially easier for an AP
to figure out which ER sent the action should there be multiple ERs
using the same IP address.
This commit is contained in:
Jouni Malinen 2009-12-12 16:40:10 +02:00
parent f439079e93
commit 31fcea931d
22 changed files with 289 additions and 67 deletions

View file

@ -197,10 +197,9 @@ void Peers::enter_pin()
int peer_type = ctx_item->data(peer_role_type).toInt();
QString uuid;
QString addr;
addr = ctx_item->data(peer_role_address).toString();
if (peer_type == PEER_TYPE_WPS_ER_ENROLLEE)
uuid = ctx_item->data(peer_role_uuid).toString();
else
addr = ctx_item->data(peer_role_address).toString();
StringQuery input(tr("PIN:"));
input.setWindowTitle(tr("PIN for ") + ctx_item->text());
@ -212,9 +211,10 @@ void Peers::enter_pin()
size_t reply_len;
if (peer_type == PEER_TYPE_WPS_ER_ENROLLEE) {
snprintf(cmd, sizeof(cmd), "WPS_ER_PIN %s %s",
snprintf(cmd, sizeof(cmd), "WPS_ER_PIN %s %s %s",
uuid.toAscii().constData(),
input.get_string().toAscii().constData());
input.get_string().toAscii().constData(),
addr.toAscii().constData());
} else {
snprintf(cmd, sizeof(cmd), "WPS_PIN %s %s",
addr.toAscii().constData(),

View file

@ -899,6 +899,15 @@ void WpaGui::processMsg(char *msg)
if (textStatus->text() == "INACTIVE" ||
textStatus->text() == "DISCONNECTED")
wpaguiTab->setCurrentWidget(wpsTab);
} else if (str_match(pos, WPS_EVENT_AP_AVAILABLE_AUTH)) {
showTrayMessage(QSystemTrayIcon::Information, 3,
"Wi-Fi Protected Setup (WPS) AP\n"
"indicating this client is authorized.");
wpsStatusText->setText("WPS AP indicating this client is "
"authorized");
if (textStatus->text() == "INACTIVE" ||
textStatus->text() == "DISCONNECTED")
wpaguiTab->setCurrentWidget(wpsTab);
} else if (str_match(pos, WPS_EVENT_AP_AVAILABLE)) {
wpsStatusText->setText(tr("WPS AP detected"));
} else if (str_match(pos, WPS_EVENT_OVERLAP)) {