]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Call hostapd_allowed_address() directly from handle_probe_req()
authorJouni Malinen <j@w1.fi>
Sun, 29 Dec 2019 21:24:10 +0000 (23:24 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 29 Dec 2019 21:44:32 +0000 (23:44 +0200)
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>
src/ap/beacon.c
src/ap/ieee802_11.c
src/ap/ieee802_11.h

index 5a3249f20da1a818509d4064d415a5730e2d057c..f3f496ba923ed930ecf7466d44a6300823dbc4c4 100644 (file)
@@ -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
index ef1078ff0398f424ea7a9b9037a45751bf40cfa0..0fb2ec116c3540ee5e2a56f6ffecb9d26ec3ea74 100644 (file)
@@ -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 "
index b85105eddae293da5f7b14cbb7d337da70306972..0983d4c8beb2634a33cf60adb0d697a55a61c97d 100644 (file)
@@ -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);