WPS ER: Fix segfault in some selected registrar change cases
Commit628d54639a
introduced number of new WPS related ctrl_iface messages to hostapd. Some of these were for ER events which do not make any sense to hostapd that cannot operate as an ER. The WPS_EV_ER_SET_SELECTED_REGISTRAR one from wps_registrar_sel_registrar_changed_event() was especially problematic since it can cause wpa_supplicant ER code segfault due to missing event data. Revert all the ER specific changes from commit628d54639a
to get rid of the segfault and undesired extra code in hostapd. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
79b8c60f81
commit
d6d731b848
4 changed files with 0 additions and 17 deletions
|
@ -599,22 +599,16 @@ static void hostapd_wps_event_cb(void *ctx, enum wps_event event,
|
|||
wpa_msg(hapd->msg_ctx, MSG_INFO, WPS_EVENT_TIMEOUT);
|
||||
break;
|
||||
case WPS_EV_ER_AP_ADD:
|
||||
wpa_msg(hapd->msg_ctx, MSG_INFO, WPS_EVENT_ER_AP_ADD);
|
||||
break;
|
||||
case WPS_EV_ER_AP_REMOVE:
|
||||
wpa_msg(hapd->msg_ctx, MSG_INFO, WPS_EVENT_ER_AP_REMOVE);
|
||||
break;
|
||||
case WPS_EV_ER_ENROLLEE_ADD:
|
||||
wpa_msg(hapd->msg_ctx, MSG_INFO, WPS_EVENT_ER_ENROLLEE_ADD);
|
||||
break;
|
||||
case WPS_EV_ER_ENROLLEE_REMOVE:
|
||||
wpa_msg(hapd->msg_ctx, MSG_INFO, WPS_EVENT_ER_ENROLLEE_REMOVE);
|
||||
break;
|
||||
case WPS_EV_ER_AP_SETTINGS:
|
||||
wpa_msg(hapd->msg_ctx, MSG_INFO, WPS_EVENT_ER_AP_SETTINGS);
|
||||
break;
|
||||
case WPS_EV_ER_SET_SELECTED_REGISTRAR:
|
||||
wpa_msg(hapd->msg_ctx, MSG_INFO, WPS_EVENT_ER_SET_SEL_REG);
|
||||
break;
|
||||
}
|
||||
if (hapd->wps_event_cb)
|
||||
|
|
|
@ -312,15 +312,6 @@ void wps_pbc_timeout_event(struct wps_context *wps)
|
|||
}
|
||||
|
||||
|
||||
void wps_registrar_sel_registrar_changed_event(struct wps_context *wps)
|
||||
{
|
||||
if (wps->event_cb == NULL)
|
||||
return;
|
||||
|
||||
wps->event_cb(wps->cb_ctx, WPS_EV_ER_SET_SELECTED_REGISTRAR, NULL);
|
||||
}
|
||||
|
||||
|
||||
#ifdef CONFIG_WPS_OOB
|
||||
|
||||
static struct wpabuf * wps_get_oob_cred(struct wps_context *wps)
|
||||
|
|
|
@ -228,7 +228,6 @@ void wps_success_event(struct wps_context *wps);
|
|||
void wps_pwd_auth_fail_event(struct wps_context *wps, int enrollee, int part);
|
||||
void wps_pbc_overlap_event(struct wps_context *wps);
|
||||
void wps_pbc_timeout_event(struct wps_context *wps);
|
||||
void wps_registrar_sel_registrar_changed_event(struct wps_context *wps);
|
||||
|
||||
extern struct oob_device_data oob_ufd_device_data;
|
||||
extern struct oob_device_data oob_nfc_device_data;
|
||||
|
|
|
@ -3137,7 +3137,6 @@ static void wps_registrar_set_selected_timeout(void *eloop_ctx,
|
|||
"unselect internal Registrar");
|
||||
reg->selected_registrar = 0;
|
||||
reg->pbc = 0;
|
||||
wps_registrar_sel_registrar_changed_event(reg->wps);
|
||||
wps_registrar_selected_registrar_changed(reg);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue