From: Jouni Malinen Date: Wed, 26 Nov 2008 19:00:27 +0000 (+0200) Subject: WPS: Added parsing of Request Type and Response Type attributes X-Git-Tag: hostap_0_6_7~194 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=76603ad4c86ca93e35abe4f2ac5f15a51fc76194;p=thirdparty%2Fhostap.git WPS: Added parsing of Request Type and Response Type attributes --- diff --git a/src/wps/wps_common.c b/src/wps/wps_common.c index 9d76347f5..45ebef330 100644 --- a/src/wps/wps_common.c +++ b/src/wps/wps_common.c @@ -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; diff --git a/src/wps/wps_i.h b/src/wps/wps_i.h index 462535fc4..00e072b9d 100644 --- a/src/wps/wps_i.h +++ b/src/wps/wps_i.h @@ -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;