Call hostapd_allowed_address() directly from handle_probe_req()
ieee802_11_allowed_address() did not really do anything useful for the call from handle_probe_req(), so replace that with a direct call to hostapd_allowed_address() and make ieee802_11_allowed_address() a static function. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
963681723f
commit
b0621b083d
3 changed files with 12 additions and 17 deletions
|
@ -764,8 +764,8 @@ void handle_probe_req(struct hostapd_data *hapd,
|
|||
sta_track_add(hapd->iface, mgmt->sa, ssi_signal);
|
||||
ie_len = len - IEEE80211_HDRLEN;
|
||||
|
||||
ret = ieee802_11_allowed_address(hapd, mgmt->sa, (const u8 *) mgmt, len,
|
||||
&rad_info, 1);
|
||||
ret = hostapd_allowed_address(hapd, mgmt->sa, (const u8 *) mgmt, len,
|
||||
&rad_info, 1);
|
||||
if (ret == HOSTAPD_ACL_REJECT) {
|
||||
wpa_msg(hapd->msg_ctx, MSG_DEBUG,
|
||||
"Ignore Probe Request frame from " MACSTR
|
||||
|
|
|
@ -2050,20 +2050,18 @@ void ieee802_11_finish_fils_auth(struct hostapd_data *hapd,
|
|||
#endif /* CONFIG_FILS */
|
||||
|
||||
|
||||
int ieee802_11_allowed_address(struct hostapd_data *hapd, const u8 *addr,
|
||||
const u8 *msg, size_t len,
|
||||
struct radius_sta *info, int is_probe_req)
|
||||
static int ieee802_11_allowed_address(struct hostapd_data *hapd, const u8 *addr,
|
||||
const u8 *msg, size_t len,
|
||||
struct radius_sta *info)
|
||||
{
|
||||
int res;
|
||||
|
||||
res = hostapd_allowed_address(hapd, addr, msg, len, info, is_probe_req);
|
||||
res = hostapd_allowed_address(hapd, addr, msg, len, info, 0);
|
||||
|
||||
if (res == HOSTAPD_ACL_REJECT) {
|
||||
if (!is_probe_req)
|
||||
wpa_printf(MSG_DEBUG,
|
||||
"Station " MACSTR
|
||||
" not allowed to authenticate",
|
||||
MAC2STR(addr));
|
||||
wpa_printf(MSG_DEBUG, "Station " MACSTR
|
||||
" not allowed to authenticate",
|
||||
MAC2STR(addr));
|
||||
return HOSTAPD_ACL_REJECT;
|
||||
}
|
||||
|
||||
|
@ -2305,8 +2303,8 @@ static void handle_auth(struct hostapd_data *hapd,
|
|||
}
|
||||
}
|
||||
|
||||
res = ieee802_11_allowed_address(
|
||||
hapd, mgmt->sa, (const u8 *) mgmt, len, &rad_info, 0);
|
||||
res = ieee802_11_allowed_address(hapd, mgmt->sa, (const u8 *) mgmt, len,
|
||||
&rad_info);
|
||||
if (res == HOSTAPD_ACL_REJECT) {
|
||||
wpa_msg(hapd->msg_ctx, MSG_DEBUG,
|
||||
"Ignore Authentication frame from " MACSTR
|
||||
|
@ -4065,7 +4063,7 @@ static void handle_assoc(struct hostapd_data *hapd,
|
|||
|
||||
acl_res = ieee802_11_allowed_address(hapd, mgmt->sa,
|
||||
(const u8 *) mgmt,
|
||||
len, &info, 0);
|
||||
len, &info);
|
||||
if (acl_res == HOSTAPD_ACL_REJECT) {
|
||||
wpa_msg(hapd->msg_ctx, MSG_DEBUG,
|
||||
"Ignore Association Request frame from "
|
||||
|
|
|
@ -179,9 +179,6 @@ void handle_auth_fils(struct hostapd_data *hapd, struct sta_info *sta,
|
|||
|
||||
size_t hostapd_eid_owe_trans_len(struct hostapd_data *hapd);
|
||||
u8 * hostapd_eid_owe_trans(struct hostapd_data *hapd, u8 *eid, size_t len);
|
||||
int ieee802_11_allowed_address(struct hostapd_data *hapd, const u8 *addr,
|
||||
const u8 *msg, size_t len,
|
||||
struct radius_sta *info, int is_probe_req);
|
||||
|
||||
int get_tx_parameters(struct sta_info *sta, int ap_max_chanwidth,
|
||||
int ap_seg1_idx, int *bandwidth, int *seg1_idx);
|
||||
|
|
Loading…
Reference in a new issue