Lines Matching refs:attr
1028 struct wps_parse_attr attr;
1034 if (wps_parse_msg(&buf, &attr) < 0) {
1039 if (wps_validate_network_idx(attr.network_idx, 1) ||
1040 wps_validate_ssid(attr.ssid, attr.ssid_len, 1) ||
1041 wps_validate_auth_type(attr.auth_type, 1) ||
1042 wps_validate_encr_type(attr.encr_type, 1) ||
1043 wps_validate_network_key_index(attr.network_key_idx, 0) ||
1044 wps_validate_network_key(attr.network_key, attr.network_key_len,
1045 attr.encr_type, 1) ||
1046 wps_validate_mac_addr(attr.mac_addr, 1) ||
1047 wps_validate_network_key_shareable(attr.network_key_shareable, 0))
1083 struct wps_parse_attr attr;
1090 if (wps_parse_msg(wps_ie, &attr) < 0) {
1096 wps2 = attr.version2 != NULL;
1097 sel_reg = attr.selected_registrar != NULL &&
1098 *attr.selected_registrar != 0;
1099 if (wps_validate_version(attr.version, 1) ||
1100 wps_validate_wps_state(attr.wps_state, 1) ||
1101 wps_validate_ap_setup_locked(attr.ap_setup_locked, 0) ||
1102 wps_validate_selected_registrar(attr.selected_registrar, 0) ||
1103 wps_validate_dev_password_id(attr.dev_password_id, sel_reg) ||
1104 wps_validate_sel_reg_config_methods(attr.sel_reg_config_methods,
1106 wps_validate_uuid_e(attr.uuid_e, 0) ||
1107 wps_validate_rf_bands(attr.rf_bands, 0) ||
1108 wps_validate_version2(attr.version2, wps2) ||
1109 wps_validate_authorized_macs(attr.authorized_macs,
1110 attr.authorized_macs_len, 0)) {
1122 struct wps_parse_attr attr;
1130 if (wps_parse_msg(wps_ie, &attr) < 0) {
1136 wps2 = attr.version2 != NULL;
1137 sel_reg = attr.selected_registrar != NULL &&
1138 *attr.selected_registrar != 0;
1139 if (wps_validate_version(attr.version, 1) ||
1140 wps_validate_wps_state(attr.wps_state, 1) ||
1141 wps_validate_ap_setup_locked(attr.ap_setup_locked, 0) ||
1142 wps_validate_selected_registrar(attr.selected_registrar, 0) ||
1143 wps_validate_dev_password_id(attr.dev_password_id, sel_reg) ||
1144 wps_validate_sel_reg_config_methods(attr.sel_reg_config_methods,
1146 wps_validate_response_type(attr.response_type, probe) ||
1147 wps_validate_uuid_e(attr.uuid_e, probe) ||
1148 wps_validate_manufacturer(attr.manufacturer, attr.manufacturer_len,
1150 wps_validate_model_name(attr.model_name, attr.model_name_len,
1152 wps_validate_model_number(attr.model_number, attr.model_number_len,
1154 wps_validate_serial_number(attr.serial_number,
1155 attr.serial_number_len, probe) ||
1156 wps_validate_primary_dev_type(attr.primary_dev_type, probe) ||
1157 wps_validate_dev_name(attr.dev_name, attr.dev_name_len, probe) ||
1158 wps_validate_ap_config_methods(attr.config_methods, wps2, probe) ||
1159 wps_validate_rf_bands(attr.rf_bands, 0) ||
1160 wps_validate_version2(attr.version2, wps2) ||
1161 wps_validate_authorized_macs(attr.authorized_macs,
1162 attr.authorized_macs_len, 0)) {
1180 struct wps_parse_attr attr;
1188 if (wps_parse_msg(wps_ie, &attr) < 0) {
1194 wps2 = attr.version2 != NULL;
1195 if (wps_validate_version(attr.version, 1) ||
1196 wps_validate_request_type(attr.request_type, 1) ||
1197 wps_validate_config_methods(attr.config_methods, wps2, 1) ||
1198 wps_validate_uuid_e(attr.uuid_e, attr.uuid_r == NULL) ||
1199 wps_validate_uuid_r(attr.uuid_r, attr.uuid_e == NULL) ||
1200 wps_validate_primary_dev_type(attr.primary_dev_type, 1) ||
1201 wps_validate_rf_bands(attr.rf_bands, 1) ||
1202 wps_validate_assoc_state(attr.assoc_state, 1) ||
1203 wps_validate_config_error(attr.config_error, 1) ||
1204 wps_validate_dev_password_id(attr.dev_password_id, 1) ||
1205 wps_validate_version2(attr.version2, wps2) ||
1206 wps_validate_manufacturer(attr.manufacturer, attr.manufacturer_len,
1208 wps_validate_model_name(attr.model_name, attr.model_name_len,
1210 wps_validate_model_number(attr.model_number, attr.model_number_len,
1212 wps_validate_dev_name(attr.dev_name, attr.dev_name_len, wps2) ||
1213 wps_validate_request_to_enroll(attr.request_to_enroll, 0) ||
1214 wps_validate_req_dev_type(attr.req_dev_type, attr.num_req_dev_type,
1227 struct wps_parse_attr attr;
1235 if (wps_parse_msg(wps_ie, &attr) < 0) {
1241 wps2 = attr.version2 != NULL;
1242 if (wps_validate_version(attr.version, 1) ||
1243 wps_validate_request_type(attr.request_type, 1) ||
1244 wps_validate_version2(attr.version2, wps2)) {
1256 struct wps_parse_attr attr;
1264 if (wps_parse_msg(wps_ie, &attr) < 0) {
1270 wps2 = attr.version2 != NULL;
1271 if (wps_validate_version(attr.version, 1) ||
1272 wps_validate_response_type(attr.response_type, 1) ||
1273 wps_validate_version2(attr.version2, wps2)) {
1285 struct wps_parse_attr attr;
1292 if (wps_parse_msg(tlvs, &attr) < 0) {
1298 wps2 = attr.version2 != NULL;
1299 if (wps_validate_version(attr.version, 1) ||
1300 wps_validate_msg_type(attr.msg_type, 1) ||
1301 wps_validate_uuid_e(attr.uuid_e, 1) ||
1302 wps_validate_mac_addr(attr.mac_addr, 1) ||
1303 wps_validate_enrollee_nonce(attr.enrollee_nonce, 1) ||
1304 wps_validate_public_key(attr.public_key, attr.public_key_len, 1) ||
1305 wps_validate_auth_type_flags(attr.auth_type_flags, 1) ||
1306 wps_validate_encr_type_flags(attr.encr_type_flags, 1) ||
1307 wps_validate_conn_type_flags(attr.conn_type_flags, 1) ||
1308 wps_validate_config_methods(attr.config_methods, wps2, 1) ||
1309 wps_validate_wps_state(attr.wps_state, 1) ||
1310 wps_validate_manufacturer(attr.manufacturer, attr.manufacturer_len,
1312 wps_validate_model_name(attr.model_name, attr.model_name_len, 1) ||
1313 wps_validate_model_number(attr.model_number, attr.model_number_len,
1315 wps_validate_serial_number(attr.serial_number,
1316 attr.serial_number_len, 1) ||
1317 wps_validate_primary_dev_type(attr.primary_dev_type, 1) ||
1318 wps_validate_dev_name(attr.dev_name, attr.dev_name_len, 1) ||
1319 wps_validate_rf_bands(attr.rf_bands, 1) ||
1320 wps_validate_assoc_state(attr.assoc_state, 1) ||
1321 wps_validate_dev_password_id(attr.dev_password_id, 1) ||
1322 wps_validate_config_error(attr.config_error, 1) ||
1323 wps_validate_os_version(attr.os_version, 1) ||
1324 wps_validate_version2(attr.version2, wps2) ||
1325 wps_validate_request_to_enroll(attr.request_to_enroll, 0)) {
1341 struct wps_parse_attr attr;
1348 if (wps_parse_msg(tlvs, &attr) < 0) {
1354 wps2 = attr.version2 != NULL;
1355 if (wps_validate_version(attr.version, 1) ||
1356 wps_validate_msg_type(attr.msg_type, 1) ||
1357 wps_validate_enrollee_nonce(attr.enrollee_nonce, 1) ||
1358 wps_validate_registrar_nonce(attr.registrar_nonce, 1) ||
1359 wps_validate_uuid_r(attr.uuid_r, 1) ||
1360 wps_validate_public_key(attr.public_key, attr.public_key_len, 1) ||
1361 wps_validate_auth_type_flags(attr.auth_type_flags, 1) ||
1362 wps_validate_encr_type_flags(attr.encr_type_flags, 1) ||
1363 wps_validate_conn_type_flags(attr.conn_type_flags, 1) ||
1364 wps_validate_config_methods(attr.config_methods, wps2, 1) ||
1365 wps_validate_manufacturer(attr.manufacturer, attr.manufacturer_len,
1367 wps_validate_model_name(attr.model_name, attr.model_name_len, 1) ||
1368 wps_validate_model_number(attr.model_number, attr.model_number_len,
1370 wps_validate_serial_number(attr.serial_number,
1371 attr.serial_number_len, 1) ||
1372 wps_validate_primary_dev_type(attr.primary_dev_type, 1) ||
1373 wps_validate_dev_name(attr.dev_name, attr.dev_name_len, 1) ||
1374 wps_validate_rf_bands(attr.rf_bands, 1) ||
1375 wps_validate_assoc_state(attr.assoc_state, 1) ||
1376 wps_validate_config_error(attr.config_error, 1) ||
1377 wps_validate_dev_password_id(attr.dev_password_id, 1) ||
1378 wps_validate_os_version(attr.os_version, 1) ||
1379 wps_validate_version2(attr.version2, wps2) ||
1380 wps_validate_authenticator(attr.authenticator, 1)) {
1396 struct wps_parse_attr attr;
1403 if (wps_parse_msg(tlvs, &attr) < 0) {
1409 wps2 = attr.version2 != NULL;
1410 if (wps_validate_version(attr.version, 1) ||
1411 wps_validate_msg_type(attr.msg_type, 1) ||
1412 wps_validate_enrollee_nonce(attr.enrollee_nonce, 1) ||
1413 wps_validate_registrar_nonce(attr.registrar_nonce, 1) ||
1414 wps_validate_uuid_r(attr.uuid_r, 1) ||
1415 wps_validate_auth_type_flags(attr.auth_type_flags, 1) ||
1416 wps_validate_encr_type_flags(attr.encr_type_flags, 1) ||
1417 wps_validate_conn_type_flags(attr.conn_type_flags, 1) ||
1418 wps_validate_config_methods(attr.config_methods, wps2, 1) ||
1419 wps_validate_manufacturer(attr.manufacturer, attr.manufacturer_len,
1421 wps_validate_model_name(attr.model_name, attr.model_name_len, 1) ||
1422 wps_validate_model_number(attr.model_number, attr.model_number_len,
1424 wps_validate_serial_number(attr.serial_number,
1425 attr.serial_number_len, 1) ||
1426 wps_validate_primary_dev_type(attr.primary_dev_type, 1) ||
1427 wps_validate_dev_name(attr.dev_name, attr.dev_name_len, 1) ||
1428 wps_validate_rf_bands(attr.rf_bands, 1) ||
1429 wps_validate_assoc_state(attr.assoc_state, 1) ||
1430 wps_validate_config_error(attr.config_error, 1) ||
1431 wps_validate_os_version(attr.os_version, 1) ||
1432 wps_validate_version2(attr.version2, wps2)) {
1448 struct wps_parse_attr attr;
1455 if (wps_parse_msg(tlvs, &attr) < 0) {
1461 wps2 = attr.version2 != NULL;
1462 if (wps_validate_version(attr.version, 1) ||
1463 wps_validate_msg_type(attr.msg_type, 1) ||
1464 wps_validate_registrar_nonce(attr.registrar_nonce, 1) ||
1465 wps_validate_e_hash1(attr.e_hash1, 1) ||
1466 wps_validate_e_hash2(attr.e_hash2, 1) ||
1467 wps_validate_version2(attr.version2, wps2) ||
1468 wps_validate_authenticator(attr.authenticator, 1)) {
1484 struct wps_parse_attr attr;
1491 if (wps_parse_msg(tlvs, &attr) < 0) {
1497 wps2 = attr.version2 != NULL;
1498 if (wps_validate_version(attr.version, 1) ||
1499 wps_validate_msg_type(attr.msg_type, 1) ||
1500 wps_validate_enrollee_nonce(attr.enrollee_nonce, 1) ||
1501 wps_validate_r_hash1(attr.r_hash1, 1) ||
1502 wps_validate_r_hash2(attr.r_hash2, 1) ||
1503 wps_validate_encr_settings(attr.encr_settings,
1504 attr.encr_settings_len, 1) ||
1505 wps_validate_version2(attr.version2, wps2) ||
1506 wps_validate_authenticator(attr.authenticator, 1)) {
1522 struct wps_parse_attr attr;
1529 if (wps_parse_msg(tlvs, &attr) < 0) {
1535 if (wps_validate_r_snonce1(attr.r_snonce1, 1) ||
1536 wps_validate_key_wrap_auth(attr.key_wrap_auth, 1)) {
1553 struct wps_parse_attr attr;
1560 if (wps_parse_msg(tlvs, &attr) < 0) {
1566 wps2 = attr.version2 != NULL;
1567 if (wps_validate_version(attr.version, 1) ||
1568 wps_validate_msg_type(attr.msg_type, 1) ||
1569 wps_validate_registrar_nonce(attr.registrar_nonce, 1) ||
1570 wps_validate_encr_settings(attr.encr_settings,
1571 attr.encr_settings_len, 1) ||
1572 wps_validate_version2(attr.version2, wps2) ||
1573 wps_validate_authenticator(attr.authenticator, 1)) {
1589 struct wps_parse_attr attr;
1596 if (wps_parse_msg(tlvs, &attr) < 0) {
1602 if (wps_validate_e_snonce1(attr.e_snonce1, 1) ||
1603 wps_validate_key_wrap_auth(attr.key_wrap_auth, 1)) {
1620 struct wps_parse_attr attr;
1627 if (wps_parse_msg(tlvs, &attr) < 0) {
1633 wps2 = attr.version2 != NULL;
1634 if (wps_validate_version(attr.version, 1) ||
1635 wps_validate_msg_type(attr.msg_type, 1) ||
1636 wps_validate_enrollee_nonce(attr.enrollee_nonce, 1) ||
1637 wps_validate_encr_settings(attr.encr_settings,
1638 attr.encr_settings_len, 1) ||
1639 wps_validate_version2(attr.version2, wps2) ||
1640 wps_validate_authenticator(attr.authenticator, 1)) {
1656 struct wps_parse_attr attr;
1663 if (wps_parse_msg(tlvs, &attr) < 0) {
1669 if (wps_validate_r_snonce2(attr.r_snonce2, 1) ||
1670 wps_validate_key_wrap_auth(attr.key_wrap_auth, 1)) {
1687 struct wps_parse_attr attr;
1694 if (wps_parse_msg(tlvs, &attr) < 0) {
1700 wps2 = attr.version2 != NULL;
1701 if (wps_validate_version(attr.version, 1) ||
1702 wps_validate_msg_type(attr.msg_type, 1) ||
1703 wps_validate_registrar_nonce(attr.registrar_nonce, 1) ||
1704 wps_validate_encr_settings(attr.encr_settings,
1705 attr.encr_settings_len, 1) ||
1706 wps_validate_settings_delay_time(attr.settings_delay_time, 0) ||
1707 wps_validate_version2(attr.version2, wps2) ||
1708 wps_validate_authenticator(attr.authenticator, 1)) {
1724 struct wps_parse_attr attr;
1731 if (wps_parse_msg(tlvs, &attr) < 0) {
1737 if (wps_validate_e_snonce2(attr.e_snonce2, 1) ||
1738 wps_validate_ssid(attr.ssid, attr.ssid_len, !ap) ||
1739 wps_validate_mac_addr(attr.mac_addr, !ap) ||
1740 wps_validate_auth_type(attr.auth_type, !ap) ||
1741 wps_validate_encr_type(attr.encr_type, !ap) ||
1742 wps_validate_network_key_index(attr.network_key_idx, 0) ||
1743 wps_validate_network_key(attr.network_key, attr.network_key_len,
1744 attr.encr_type, !ap) ||
1745 wps_validate_key_wrap_auth(attr.key_wrap_auth, 1)) {
1762 struct wps_parse_attr attr;
1769 if (wps_parse_msg(tlvs, &attr) < 0) {
1775 wps2 = attr.version2 != NULL;
1776 if (wps_validate_version(attr.version, 1) ||
1777 wps_validate_msg_type(attr.msg_type, 1) ||
1778 wps_validate_enrollee_nonce(attr.enrollee_nonce, 1) ||
1779 wps_validate_encr_settings(attr.encr_settings,
1780 attr.encr_settings_len, 1) ||
1781 wps_validate_version2(attr.version2, wps2) ||
1782 wps_validate_authenticator(attr.authenticator, 1)) {
1798 struct wps_parse_attr attr;
1805 if (wps_parse_msg(tlvs, &attr) < 0) {
1811 if (wps_validate_ssid(attr.ssid, attr.ssid_len, ap) ||
1812 wps_validate_auth_type(attr.auth_type, ap) ||
1813 wps_validate_encr_type(attr.encr_type, ap) ||
1814 wps_validate_network_key_index(attr.network_key_idx, 0) ||
1815 wps_validate_mac_addr(attr.mac_addr, ap) ||
1816 wps_validate_credential(attr.cred, attr.cred_len, attr.num_cred,
1818 wps_validate_key_wrap_auth(attr.key_wrap_auth, 1)) {
1835 struct wps_parse_attr attr;
1842 if (wps_parse_msg(tlvs, &attr) < 0) {
1848 wps2 = attr.version2 != NULL;
1849 if (wps_validate_version(attr.version, 1) ||
1850 wps_validate_msg_type(attr.msg_type, 1) ||
1851 wps_validate_enrollee_nonce(attr.enrollee_nonce, 1) ||
1852 wps_validate_registrar_nonce(attr.registrar_nonce, 1) ||
1853 wps_validate_version2(attr.version2, wps2)) {
1869 struct wps_parse_attr attr;
1876 if (wps_parse_msg(tlvs, &attr) < 0) {
1882 wps2 = attr.version2 != NULL;
1883 if (wps_validate_version(attr.version, 1) ||
1884 wps_validate_msg_type(attr.msg_type, 1) ||
1885 wps_validate_enrollee_nonce(attr.enrollee_nonce, 1) ||
1886 wps_validate_registrar_nonce(attr.registrar_nonce, 1) ||
1887 wps_validate_config_error(attr.config_error, 1) ||
1888 wps_validate_version2(attr.version2, wps2)) {
1904 struct wps_parse_attr attr;
1911 if (wps_parse_msg(tlvs, &attr) < 0) {
1917 wps2 = attr.version2 != NULL;
1918 if (wps_validate_version(attr.version, 1) ||
1919 wps_validate_msg_type(attr.msg_type, 1) ||
1920 wps_validate_enrollee_nonce(attr.enrollee_nonce, 1) ||
1921 wps_validate_registrar_nonce(attr.registrar_nonce, 1) ||
1922 wps_validate_version2(attr.version2, wps2)) {
1938 struct wps_parse_attr attr;
1947 if (wps_parse_msg(tlvs, &attr) < 0) {
1953 wps2 = attr.version2 != NULL;
1954 sel_reg = attr.selected_registrar != NULL &&
1955 *attr.selected_registrar != 0;
1956 if (wps_validate_version(attr.version, 1) ||
1957 wps_validate_dev_password_id(attr.dev_password_id, sel_reg) ||
1958 wps_validate_sel_reg_config_methods(attr.sel_reg_config_methods,
1960 wps_validate_version2(attr.version2, wps2) ||
1961 wps_validate_authorized_macs(attr.authorized_macs,
1962 attr.authorized_macs_len, wps2) ||
1963 wps_validate_uuid_r(attr.uuid_r, wps2)) {