Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int wps_is_selected_pin_registrar(const struct wpabuf *msg)
- {
- struct wps_parse_attr attr;
- /*
- * In theory, this could also verify that attr.sel_reg_config_methods
- * includes WPS_CONFIG_LABEL, WPS_CONFIG_DISPLAY, or WPS_CONFIG_KEYPAD,
- * but some deployed AP implementations do not set Selected Registrar
- * Config Methods attribute properly, so it is safer to just use
- * Device Password ID here.
- */
- if (wps_parse_msg(msg, &attr) < 0)
- return 0;
- if (!attr.selected_registrar || *attr.selected_registrar == 0)
- return 0;
- if (attr.dev_password_id != NULL &&
- WPA_GET_BE16(attr.dev_password_id) == DEV_PW_PUSHBUTTON)
- return 0;
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement