- char *s2;
- unsigned int tmp = strtoul(s, &s2, 10);
-
- if (*s2 == '.') {
- /* Vendor attributes formatted as Vendor.Attribute */
- attrid->first = tmp;
- attrid->second = strtoul(s2 + 1, NULL, 10);
- ret = true;
- } else if (*s2 == '\0') {
+ unsigned int tmp = strtoul(s, &s, 10);
+
+ if (*s == '.') {
+ s++;
+
+ switch (tmp) {
+ case PW_VENDOR_SPECIFIC:
+ /* attribute name formatted as 26.Vendor.Attribute */
+ attrid->first = strtoul(s, &s, 10);
+ if (*s == '.') {
+ s++;
+ attrid->second = strtoul(s, &s, 10);
+ ret = (*s == '\0');
+ }
+ break;
+ default:
+ break;
+ }
+ } else if (*s == '\0') {