wpa_supplicant / hostapd  2.5
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Data Structures | Macros | Functions
ieee802_11_auth.c File Reference

hostapd / IEEE 802.11 authentication (ACL) More...

#include "utils/includes.h"
#include "utils/common.h"
#include "utils/eloop.h"
#include "crypto/sha1.h"
#include "radius/radius.h"
#include "radius/radius_client.h"
#include "hostapd.h"
#include "ap_config.h"
#include "ap_drv_ops.h"
#include "ieee802_11.h"
#include "ieee802_1x.h"
#include "ieee802_11_auth.h"

Data Structures

struct  hostapd_cached_radius_acl
 
struct  hostapd_acl_query_data
 

Macros

#define RADIUS_ACL_TIMEOUT   30
 

Functions

int hostapd_allowed_address (struct hostapd_data *hapd, const u8 *addr, const u8 *msg, size_t len, u32 *session_timeout, u32 *acct_interim_interval, int *vlan_id, struct hostapd_sta_wpa_psk_short **psk, char **identity, char **radius_cui)
 Check whether a specified STA can be authenticated. More...
 
void hostapd_acl_expire (struct hostapd_data *hapd)
 ACL cache expiration callback. More...
 
int hostapd_acl_init (struct hostapd_data *hapd)
 hostapd_acl_init: Initialize IEEE 802.11 ACL More...
 
void hostapd_acl_deinit (struct hostapd_data *hapd)
 Deinitialize IEEE 802.11 ACL. More...
 
void hostapd_free_psk_list (struct hostapd_sta_wpa_psk_short *psk)
 

Detailed Description

hostapd / IEEE 802.11 authentication (ACL)

Access control list for IEEE 802.11 authentication can uses statically configured ACL from configuration files or an external RADIUS server. Results from external RADIUS queries are cached to allow faster authentication frame processing.

Function Documentation

void hostapd_acl_deinit ( struct hostapd_data hapd)

Deinitialize IEEE 802.11 ACL.

Parameters
hapdhostapd BSS data
void hostapd_acl_expire ( struct hostapd_data hapd)

ACL cache expiration callback.

Parameters
hapdstruct hostapd_data *
int hostapd_acl_init ( struct hostapd_data hapd)

hostapd_acl_init: Initialize IEEE 802.11 ACL

Parameters
hapdhostapd BSS data
Returns
0 on success, -1 on failure
int hostapd_allowed_address ( struct hostapd_data hapd,
const u8 *  addr,
const u8 *  msg,
size_t  len,
u32 *  session_timeout,
u32 *  acct_interim_interval,
int *  vlan_id,
struct hostapd_sta_wpa_psk_short **  psk,
char **  identity,
char **  radius_cui 
)

Check whether a specified STA can be authenticated.

Parameters
hapdhostapd BSS data
addrMAC address of the STA
msgAuthentication message
lenLength of msg in octets
session_timeoutBuffer for returning session timeout (from RADIUS)
acct_interim_intervalBuffer for returning account interval (from RADIUS)
vlan_idBuffer for returning VLAN ID
pskLinked list buffer for returning WPA PSK
identityBuffer for returning identity (from RADIUS)
radius_cuiBuffer for returning CUI (from RADIUS)
Returns
HOSTAPD_ACL_ACCEPT, HOSTAPD_ACL_REJECT, or HOSTAPD_ACL_PENDING

The caller is responsible for freeing the returned *identity and *radius_cui values with os_free().