aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2009-11-13 20:29:31 (GMT)
committerJouni Malinen <j@w1.fi>2009-11-22 19:27:33 (GMT)
commit48a121464e37cc05ea58d26922d2f5cfb0cc771e (patch)
treeceb71a2283f2298deb54fbcacdac6214264e8f47 /src
parentff725844e94377ab2627d1829c0dee1dbb1befa5 (diff)
downloadhostap-06-48a121464e37cc05ea58d26922d2f5cfb0cc771e.zip
hostap-06-48a121464e37cc05ea58d26922d2f5cfb0cc771e.tar.gz
hostap-06-48a121464e37cc05ea58d26922d2f5cfb0cc771e.tar.bz2
WPS: Fix OpCode when proxying WSC_ACK or WSC_NACK from ER
Previously, WSC_MSG was hardcoded for every message from ER, but this needs to be changed based on message type to send a valid message to the Enrollee via EAP transport. (cherry picked from commit 04f5d740772c53125bdf9251565d0e438b239430)
Diffstat (limited to 'src')
-rw-r--r--src/wps/wps_registrar.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/wps/wps_registrar.c b/src/wps/wps_registrar.c
index f9a6bcb..e6f4bcc 100644
--- a/src/wps/wps_registrar.c
+++ b/src/wps/wps_registrar.c
@@ -1406,8 +1406,18 @@ struct wpabuf * wps_registrar_get_msg(struct wps_data *wps,
else
wps->wps->upnp_msgs = NULL;
msg = p->msg;
+ switch (p->type) {
+ case WPS_WSC_ACK:
+ *op_code = WSC_ACK;
+ break;
+ case WPS_WSC_NACK:
+ *op_code = WSC_NACK;
+ break;
+ default:
+ *op_code = WSC_MSG;
+ break;
+ }
os_free(p);
- *op_code = WSC_MSG;
if (wps->ext_reg == 0)
wps->ext_reg = 1;
return msg;