Lines Matching +full:vendor +full:- +full:extension
2 * Wi-Fi Protected Setup - attribute parsing
30 return -1; in wps_set_vendor_ext_wfa_subelem()
32 attr->version2 = pos; in wps_set_vendor_ext_wfa_subelem()
35 attr->authorized_macs = pos; in wps_set_vendor_ext_wfa_subelem()
36 attr->authorized_macs_len = len; in wps_set_vendor_ext_wfa_subelem()
42 return -1; in wps_set_vendor_ext_wfa_subelem()
44 attr->network_key_shareable = pos; in wps_set_vendor_ext_wfa_subelem()
50 return -1; in wps_set_vendor_ext_wfa_subelem()
52 attr->request_to_enroll = pos; in wps_set_vendor_ext_wfa_subelem()
58 return -1; in wps_set_vendor_ext_wfa_subelem()
60 attr->settings_delay_time = pos; in wps_set_vendor_ext_wfa_subelem()
66 return -1; in wps_set_vendor_ext_wfa_subelem()
68 attr->registrar_configuration_methods = pos; in wps_set_vendor_ext_wfa_subelem()
73 "WPS: Invalid Multi-AP Extension length %u", in wps_set_vendor_ext_wfa_subelem()
75 return -1; in wps_set_vendor_ext_wfa_subelem()
77 attr->multi_ap_ext = *pos; in wps_set_vendor_ext_wfa_subelem()
78 wpa_printf(MSG_DEBUG, "WPS: Multi-AP Extension 0x%02x", in wps_set_vendor_ext_wfa_subelem()
79 attr->multi_ap_ext); in wps_set_vendor_ext_wfa_subelem()
82 wpa_printf(MSG_MSGDUMP, "WPS: Skipped unknown WFA Vendor " in wps_set_vendor_ext_wfa_subelem()
83 "Extension subelement %u", id); in wps_set_vendor_ext_wfa_subelem()
97 while (end - pos >= 2) { in wps_parse_vendor_ext_wfa()
100 if (elen > end - pos) in wps_parse_vendor_ext_wfa()
103 return -1; in wps_parse_vendor_ext_wfa()
117 wpa_printf(MSG_DEBUG, "WPS: Skip invalid Vendor Extension"); in wps_parse_vendor_ext()
124 return wps_parse_vendor_ext_wfa(attr, pos + 3, len - 3); in wps_parse_vendor_ext()
127 /* Handle unknown vendor extensions */ in wps_parse_vendor_ext()
129 wpa_printf(MSG_MSGDUMP, "WPS: Unknown Vendor Extension (Vendor ID %u)", in wps_parse_vendor_ext()
133 wpa_printf(MSG_DEBUG, "WPS: Too long Vendor Extension (%u)", in wps_parse_vendor_ext()
135 return -1; in wps_parse_vendor_ext()
138 if (attr->num_vendor_ext >= MAX_WPS_PARSE_VENDOR_EXT) { in wps_parse_vendor_ext()
139 wpa_printf(MSG_DEBUG, "WPS: Skipped Vendor Extension " in wps_parse_vendor_ext()
140 "attribute (max %d vendor extensions)", in wps_parse_vendor_ext()
142 return -1; in wps_parse_vendor_ext()
144 attr->vendor_ext[attr->num_vendor_ext] = pos; in wps_parse_vendor_ext()
145 attr->vendor_ext_len[attr->num_vendor_ext] = len; in wps_parse_vendor_ext()
146 attr->num_vendor_ext++; in wps_parse_vendor_ext()
160 return -1; in wps_set_attr()
162 attr->version = pos; in wps_set_attr()
168 return -1; in wps_set_attr()
170 attr->msg_type = pos; in wps_set_attr()
176 return -1; in wps_set_attr()
178 attr->enrollee_nonce = pos; in wps_set_attr()
184 return -1; in wps_set_attr()
186 attr->registrar_nonce = pos; in wps_set_attr()
190 wpa_printf(MSG_DEBUG, "WPS: Invalid UUID-E length %u", in wps_set_attr()
192 return -1; in wps_set_attr()
194 attr->uuid_e = pos; in wps_set_attr()
198 wpa_printf(MSG_DEBUG, "WPS: Invalid UUID-R length %u", in wps_set_attr()
200 return -1; in wps_set_attr()
202 attr->uuid_r = pos; in wps_set_attr()
208 return -1; in wps_set_attr()
210 attr->auth_type_flags = pos; in wps_set_attr()
216 return -1; in wps_set_attr()
218 attr->encr_type_flags = pos; in wps_set_attr()
224 return -1; in wps_set_attr()
226 attr->conn_type_flags = pos; in wps_set_attr()
232 return -1; in wps_set_attr()
234 attr->config_methods = pos; in wps_set_attr()
240 return -1; in wps_set_attr()
242 attr->sel_reg_config_methods = pos; in wps_set_attr()
248 return -1; in wps_set_attr()
250 attr->primary_dev_type = pos; in wps_set_attr()
256 return -1; in wps_set_attr()
258 attr->rf_bands = pos; in wps_set_attr()
264 return -1; in wps_set_attr()
266 attr->assoc_state = pos; in wps_set_attr()
272 return -1; in wps_set_attr()
274 attr->config_error = pos; in wps_set_attr()
280 return -1; in wps_set_attr()
282 attr->dev_password_id = pos; in wps_set_attr()
294 return -1; in wps_set_attr()
296 attr->oob_dev_password = pos; in wps_set_attr()
297 attr->oob_dev_password_len = len; in wps_set_attr()
303 return -1; in wps_set_attr()
305 attr->os_version = pos; in wps_set_attr()
309 wpa_printf(MSG_DEBUG, "WPS: Invalid Wi-Fi Protected " in wps_set_attr()
311 return -1; in wps_set_attr()
313 attr->wps_state = pos; in wps_set_attr()
319 return -1; in wps_set_attr()
321 attr->authenticator = pos; in wps_set_attr()
325 wpa_printf(MSG_DEBUG, "WPS: Invalid R-Hash1 length %u", in wps_set_attr()
327 return -1; in wps_set_attr()
329 attr->r_hash1 = pos; in wps_set_attr()
333 wpa_printf(MSG_DEBUG, "WPS: Invalid R-Hash2 length %u", in wps_set_attr()
335 return -1; in wps_set_attr()
337 attr->r_hash2 = pos; in wps_set_attr()
341 wpa_printf(MSG_DEBUG, "WPS: Invalid E-Hash1 length %u", in wps_set_attr()
343 return -1; in wps_set_attr()
345 attr->e_hash1 = pos; in wps_set_attr()
349 wpa_printf(MSG_DEBUG, "WPS: Invalid E-Hash2 length %u", in wps_set_attr()
351 return -1; in wps_set_attr()
353 attr->e_hash2 = pos; in wps_set_attr()
357 wpa_printf(MSG_DEBUG, "WPS: Invalid R-SNonce1 length " in wps_set_attr()
359 return -1; in wps_set_attr()
361 attr->r_snonce1 = pos; in wps_set_attr()
365 wpa_printf(MSG_DEBUG, "WPS: Invalid R-SNonce2 length " in wps_set_attr()
367 return -1; in wps_set_attr()
369 attr->r_snonce2 = pos; in wps_set_attr()
373 wpa_printf(MSG_DEBUG, "WPS: Invalid E-SNonce1 length " in wps_set_attr()
375 return -1; in wps_set_attr()
377 attr->e_snonce1 = pos; in wps_set_attr()
381 wpa_printf(MSG_DEBUG, "WPS: Invalid E-SNonce2 length " in wps_set_attr()
383 return -1; in wps_set_attr()
385 attr->e_snonce2 = pos; in wps_set_attr()
391 return -1; in wps_set_attr()
393 attr->key_wrap_auth = pos; in wps_set_attr()
399 return -1; in wps_set_attr()
401 attr->auth_type = pos; in wps_set_attr()
407 return -1; in wps_set_attr()
409 attr->encr_type = pos; in wps_set_attr()
415 return -1; in wps_set_attr()
417 attr->network_idx = pos; in wps_set_attr()
423 return -1; in wps_set_attr()
425 attr->network_key_idx = pos; in wps_set_attr()
431 return -1; in wps_set_attr()
433 attr->mac_addr = pos; in wps_set_attr()
439 return -1; in wps_set_attr()
441 attr->selected_registrar = pos; in wps_set_attr()
447 return -1; in wps_set_attr()
449 attr->request_type = pos; in wps_set_attr()
455 return -1; in wps_set_attr()
457 attr->response_type = pos; in wps_set_attr()
460 attr->manufacturer = pos; in wps_set_attr()
462 attr->manufacturer_len = WPS_MANUFACTURER_MAX_LEN; in wps_set_attr()
464 attr->manufacturer_len = len; in wps_set_attr()
467 attr->model_name = pos; in wps_set_attr()
469 attr->model_name_len = WPS_MODEL_NAME_MAX_LEN; in wps_set_attr()
471 attr->model_name_len = len; in wps_set_attr()
474 attr->model_number = pos; in wps_set_attr()
476 attr->model_number_len = WPS_MODEL_NUMBER_MAX_LEN; in wps_set_attr()
478 attr->model_number_len = len; in wps_set_attr()
481 attr->serial_number = pos; in wps_set_attr()
483 attr->serial_number_len = WPS_SERIAL_NUMBER_MAX_LEN; in wps_set_attr()
485 attr->serial_number_len = len; in wps_set_attr()
494 attr->dev_name = pos; in wps_set_attr()
495 attr->dev_name_len = len; in wps_set_attr()
502 * zero-padding. in wps_set_attr()
510 attr->public_key = pos; in wps_set_attr()
511 attr->public_key_len = len; in wps_set_attr()
514 attr->encr_settings = pos; in wps_set_attr()
515 attr->encr_settings_len = len; in wps_set_attr()
518 if (attr->num_cred >= MAX_CRED_COUNT) { in wps_set_attr()
524 attr->cred[attr->num_cred] = pos; in wps_set_attr()
525 attr->cred_len[attr->num_cred] = len; in wps_set_attr()
526 attr->num_cred++; in wps_set_attr()
534 attr->ssid = pos; in wps_set_attr()
535 attr->ssid_len = len; in wps_set_attr()
538 attr->network_key = pos; in wps_set_attr()
539 attr->network_key_len = len; in wps_set_attr()
545 return -1; in wps_set_attr()
547 attr->ap_setup_locked = pos; in wps_set_attr()
553 return -1; in wps_set_attr()
555 if (attr->num_req_dev_type >= MAX_REQ_DEV_TYPE_COUNT) { in wps_set_attr()
561 attr->req_dev_type[attr->num_req_dev_type] = pos; in wps_set_attr()
562 attr->num_req_dev_type++; in wps_set_attr()
569 return -1; in wps_set_attr()
571 attr->sec_dev_type_list = pos; in wps_set_attr()
572 attr->sec_dev_type_list_len = len; in wps_set_attr()
576 return -1; in wps_set_attr()
582 return -1; in wps_set_attr()
584 attr->ap_channel = pos; in wps_set_attr()
614 if (end - pos < 4) { in wps_parse_msg()
615 wpa_printf(MSG_DEBUG, "WPS: Invalid message - " in wps_parse_msg()
617 (unsigned long) (end - pos)); in wps_parse_msg()
618 return -1; in wps_parse_msg()
627 if (len > end - pos) { in wps_parse_msg()
640 wpa_printf(MSG_DEBUG, "WPS: Workaround - try " in wps_parse_msg()
643 pos -= 3; in wps_parse_msg()
647 return -1; in wps_parse_msg()
658 if (last_nonzero > (size_t) (pos - start)) in wps_parse_msg()
661 for (i = 0; i < end - pos; i++) { in wps_parse_msg()
663 last_nonzero = pos - start + i; in wps_parse_msg()
667 if (i == end - pos) { in wps_parse_msg()
668 wpa_printf(MSG_DEBUG, "WPS: Workaround - skip " in wps_parse_msg()
676 return -1; in wps_parse_msg()