]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
WPS: Added parsing of Request Type and Response Type attributes
authorJouni Malinen <j@w1.fi>
Wed, 26 Nov 2008 19:00:27 +0000 (21:00 +0200)
committerJouni Malinen <j@w1.fi>
Wed, 26 Nov 2008 19:00:27 +0000 (21:00 +0200)
src/wps/wps_common.c
src/wps/wps_i.h

index 9d76347f5db86dcb635f1de28ec2083bfb4ef06f..45ebef3301d739447c31eda8fd2e12b5aec5bd11 100644 (file)
@@ -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;
index 462535fc48e0f0f1f5c3c9a58c41a11dc6d71e0a..00e072b9d81c037640221e51a7240d19ca166075 100644 (file)
@@ -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;