ERP: Make eap_peer_finish() callable
This is needed for FILS to process EAP-Finish/Re-auth. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
		
							parent
							
								
									c28767e11c
								
							
						
					
					
						commit
						de57d87353
					
				
					 4 changed files with 19 additions and 2 deletions
				
			
		|  | @ -1591,8 +1591,7 @@ invalid: | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| static void eap_peer_finish(struct eap_sm *sm, const struct eap_hdr *hdr, | void eap_peer_finish(struct eap_sm *sm, const struct eap_hdr *hdr, size_t len) | ||||||
| 			    size_t len) |  | ||||||
| { | { | ||||||
| #ifdef CONFIG_ERP | #ifdef CONFIG_ERP | ||||||
| 	const u8 *pos = (const u8 *) (hdr + 1); | 	const u8 *pos = (const u8 *) (hdr + 1); | ||||||
|  |  | ||||||
|  | @ -349,6 +349,7 @@ void eap_set_anon_id(struct eap_sm *sm, const u8 *id, size_t len); | ||||||
| int eap_peer_was_failure_expected(struct eap_sm *sm); | int eap_peer_was_failure_expected(struct eap_sm *sm); | ||||||
| void eap_peer_erp_free_keys(struct eap_sm *sm); | void eap_peer_erp_free_keys(struct eap_sm *sm); | ||||||
| struct wpabuf * eap_peer_build_erp_reauth_start(struct eap_sm *sm, u8 eap_id); | struct wpabuf * eap_peer_build_erp_reauth_start(struct eap_sm *sm, u8 eap_id); | ||||||
|  | void eap_peer_finish(struct eap_sm *sm, const struct eap_hdr *hdr, size_t len); | ||||||
| 
 | 
 | ||||||
| #endif /* IEEE8021X_EAPOL */ | #endif /* IEEE8021X_EAPOL */ | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -2170,3 +2170,14 @@ struct wpabuf * eapol_sm_build_erp_reauth_start(struct eapol_sm *sm) | ||||||
| 	return NULL; | 	return NULL; | ||||||
| #endif /* CONFIG_ERP */ | #endif /* CONFIG_ERP */ | ||||||
| } | } | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | void eapol_sm_process_erp_finish(struct eapol_sm *sm, const u8 *buf, | ||||||
|  | 				 size_t len) | ||||||
|  | { | ||||||
|  | #ifdef CONFIG_ERP | ||||||
|  | 	if (!sm) | ||||||
|  | 		return; | ||||||
|  | 	eap_peer_finish(sm->eap, (const struct eap_hdr *) buf, len); | ||||||
|  | #endif /* CONFIG_ERP */ | ||||||
|  | } | ||||||
|  |  | ||||||
|  | @ -329,6 +329,8 @@ void eapol_sm_set_ext_pw_ctx(struct eapol_sm *sm, | ||||||
| int eapol_sm_failed(struct eapol_sm *sm); | int eapol_sm_failed(struct eapol_sm *sm); | ||||||
| void eapol_sm_erp_flush(struct eapol_sm *sm); | void eapol_sm_erp_flush(struct eapol_sm *sm); | ||||||
| struct wpabuf * eapol_sm_build_erp_reauth_start(struct eapol_sm *sm); | struct wpabuf * eapol_sm_build_erp_reauth_start(struct eapol_sm *sm); | ||||||
|  | void eapol_sm_process_erp_finish(struct eapol_sm *sm, const u8 *buf, | ||||||
|  | 				 size_t len); | ||||||
| int eapol_sm_get_eap_proxy_imsi(struct eapol_sm *sm, char *imsi, size_t *len); | int eapol_sm_get_eap_proxy_imsi(struct eapol_sm *sm, char *imsi, size_t *len); | ||||||
| #else /* IEEE8021X_EAPOL */ | #else /* IEEE8021X_EAPOL */ | ||||||
| static inline struct eapol_sm *eapol_sm_init(struct eapol_ctx *ctx) | static inline struct eapol_sm *eapol_sm_init(struct eapol_ctx *ctx) | ||||||
|  | @ -444,6 +446,10 @@ eapol_sm_build_erp_reauth_start(struct eapol_sm *sm) | ||||||
| { | { | ||||||
| 	return NULL; | 	return NULL; | ||||||
| } | } | ||||||
|  | static inline void eapol_sm_process_erp_finish(struct eapol_sm *sm, | ||||||
|  | 					       const u8 *buf, size_t len) | ||||||
|  | { | ||||||
|  | } | ||||||
| #endif /* IEEE8021X_EAPOL */ | #endif /* IEEE8021X_EAPOL */ | ||||||
| 
 | 
 | ||||||
| #endif /* EAPOL_SUPP_SM_H */ | #endif /* EAPOL_SUPP_SM_H */ | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue
	
	 Jouni Malinen
						Jouni Malinen