Use RADIUS shared secret consistently in RX handler
Use the shared_secret pointer from RADIUS client implementation instead of getting this from hostapd configuration data. Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
		
							parent
							
								
									5ee56c4e19
								
							
						
					
					
						commit
						fc5550a1c2
					
				
					 1 changed files with 5 additions and 4 deletions
				
			
		|  | @ -419,6 +419,8 @@ static void hostapd_acl_expire(void *eloop_ctx, void *timeout_ctx) | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| static void decode_tunnel_passwords(struct hostapd_data *hapd, | static void decode_tunnel_passwords(struct hostapd_data *hapd, | ||||||
|  | 				    const u8 *shared_secret, | ||||||
|  | 				    size_t shared_secret_len, | ||||||
| 				    struct radius_msg *msg, | 				    struct radius_msg *msg, | ||||||
| 				    struct radius_msg *req, | 				    struct radius_msg *req, | ||||||
| 				    struct hostapd_cached_radius_acl *cache) | 				    struct hostapd_cached_radius_acl *cache) | ||||||
|  | @ -433,9 +435,7 @@ static void decode_tunnel_passwords(struct hostapd_data *hapd, | ||||||
| 	 */ | 	 */ | ||||||
| 	for (i = 0; ; i++) { | 	for (i = 0; ; i++) { | ||||||
| 		passphrase = radius_msg_get_tunnel_password( | 		passphrase = radius_msg_get_tunnel_password( | ||||||
| 			msg, &passphraselen, | 			msg, &passphraselen, shared_secret, shared_secret_len, | ||||||
| 			hapd->conf->radius->auth_server->shared_secret, |  | ||||||
| 			hapd->conf->radius->auth_server->shared_secret_len, |  | ||||||
| 			req, i); | 			req, i); | ||||||
| 		/*
 | 		/*
 | ||||||
| 		 * Passphrase is NULL iff there is no i-th Tunnel-Password | 		 * Passphrase is NULL iff there is no i-th Tunnel-Password | ||||||
|  | @ -546,7 +546,8 @@ hostapd_acl_recv_radius(struct radius_msg *msg, struct radius_msg *req, | ||||||
| 
 | 
 | ||||||
| 		cache->vlan_id = radius_msg_get_vlanid(msg); | 		cache->vlan_id = radius_msg_get_vlanid(msg); | ||||||
| 
 | 
 | ||||||
| 		decode_tunnel_passwords(hapd, msg, req, cache); | 		decode_tunnel_passwords(hapd, shared_secret, shared_secret_len, | ||||||
|  | 					msg, req, cache); | ||||||
| 
 | 
 | ||||||
| 		if (radius_msg_get_attr_ptr(msg, RADIUS_ATTR_USER_NAME, | 		if (radius_msg_get_attr_ptr(msg, RADIUS_ATTR_USER_NAME, | ||||||
| 					    &buf, &len, NULL) == 0) { | 					    &buf, &len, NULL) == 0) { | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue
	
	 Jouni Malinen
						Jouni Malinen