]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Reduce undesired logging of ACL rejection events from AP mode
authorJouni Malinen <j@w1.fi>
Sun, 14 Oct 2018 16:57:22 +0000 (19:57 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 14 Oct 2018 16:57:22 +0000 (19:57 +0300)
When Probe Request frame handling was extended to use MAC ACL through
ieee802_11_allowed_address(), the MSG_INFO level log print ("Station
<addr> not allowed to authenticate") from that function ended up getting
printed even for Probe Request frames. That was not by design and it can
result in excessive logging and MSG_INFO level if MAC ACL is used.

Fix this by printing this log entry only for authentication and
association frames. In addition, drop the priority of that log entry to
MSG_DEBUG since this is not really an unexpected behavior in most MAC
ACL use cases.

Fixes: 92eb00aec2a0 ("Extend ACL check for Probe Request frames")
Signed-off-by: Jouni Malinen <j@w1.fi>
src/ap/ieee802_11.c

index d8b34fa52b21acbf649e9dc5149015bf5f772234..00ff116940996ade16f0d56385e4e6c2df202ea3 100644 (file)
@@ -1665,9 +1665,11 @@ ieee802_11_allowed_address(struct hostapd_data *hapd, const u8 *addr,
                                      is_probe_req);
 
        if (res == HOSTAPD_ACL_REJECT) {
-               wpa_printf(MSG_INFO,
-                          "Station " MACSTR " not allowed to authenticate",
-                          MAC2STR(addr));
+               if (!is_probe_req)
+                       wpa_printf(MSG_DEBUG,
+                                  "Station " MACSTR
+                                  " not allowed to authenticate",
+                                  MAC2STR(addr));
                return HOSTAPD_ACL_REJECT;
        }