WPS: Added parsing of Request Type and Response Type attributes
This commit is contained in:
		
							parent
							
								
									f855f923a7
								
							
						
					
					
						commit
						76603ad4c8
					
				
					 2 changed files with 18 additions and 0 deletions
				
			
		|  | @ -314,6 +314,22 @@ static int wps_set_attr(struct wps_parse_attr *attr, u16 type, | |||
| 		} | ||||
| 		attr->selected_registrar = pos; | ||||
| 		break; | ||||
| 	case ATTR_REQUEST_TYPE: | ||||
| 		if (len != 1) { | ||||
| 			wpa_printf(MSG_DEBUG, "WPS: Invalid Request Type " | ||||
| 				   "length %u", len); | ||||
| 			return -1; | ||||
| 		} | ||||
| 		attr->request_type = pos; | ||||
| 		break; | ||||
| 	case ATTR_RESPONSE_TYPE: | ||||
| 		if (len != 1) { | ||||
| 			wpa_printf(MSG_DEBUG, "WPS: Invalid Response Type " | ||||
| 				   "length %u", len); | ||||
| 			return -1; | ||||
| 		} | ||||
| 		attr->request_type = pos; | ||||
| 		break; | ||||
| 	case ATTR_MANUFACTURER: | ||||
| 		attr->manufacturer = pos; | ||||
| 		attr->manufacturer_len = len; | ||||
|  |  | |||
|  | @ -112,6 +112,8 @@ struct wps_parse_attr { | |||
| 	const u8 *key_prov_auto; /* 1 octet (Bool) */ | ||||
| 	const u8 *dot1x_enabled; /* 1 octet (Bool) */ | ||||
| 	const u8 *selected_registrar; /* 1 octet (Bool) */ | ||||
| 	const u8 *request_type; /* 1 octet */ | ||||
| 	const u8 *response_type; /* 1 octet */ | ||||
| 
 | ||||
| 	/* variable length fields */ | ||||
| 	const u8 *manufacturer; | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue
	
	 Jouni Malinen
						Jouni Malinen