]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Send CTRL-EVENT-SIGNAL-CHANGE message to control interfaces only
authorKan-Ru Chen <kanru@kanru.info>
Sun, 22 Dec 2024 23:42:33 +0000 (08:42 +0900)
committerJouni Malinen <j@w1.fi>
Mon, 23 Dec 2024 10:16:40 +0000 (12:16 +0200)
The default logging level for the CTRL-EVENT-SIGNAL-CHANGE message
may be repeated many times and fill the log file or journal.

For example https://bugzilla.redhat.com/show_bug.cgi?id=2309148 and
the first few results from searching CTRL-EVENT-SIGNAL-CHANGE on the
web contain various complaints and workarounds.

Change the logging method to wpa_msg_ctrl to avoid sending frequent
messages to the syslog but still allow the message to be consumed by
control interface monitors.

Signed-off-by: Kan-Ru Chen <kanru@kanru.info>
wpa_supplicant/events.c

index 5a1bc6d58f727ba85b25aec85f07fb42ca6ba334..00109a0cd7801ace1cac682b86ffab6df5c2d04b 100644 (file)
@@ -6766,12 +6766,12 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
                                        data->eapol_rx.encrypted);
                break;
        case EVENT_SIGNAL_CHANGE:
-               wpa_msg(wpa_s, MSG_INFO, WPA_EVENT_SIGNAL_CHANGE
-                       "above=%d signal=%d noise=%d txrate=%lu",
-                       data->signal_change.above_threshold,
-                       data->signal_change.data.signal,
-                       data->signal_change.current_noise,
-                       data->signal_change.data.current_tx_rate);
+               wpa_msg_ctrl(wpa_s, MSG_INFO, WPA_EVENT_SIGNAL_CHANGE
+                            "above=%d signal=%d noise=%d txrate=%lu",
+                            data->signal_change.above_threshold,
+                            data->signal_change.data.signal,
+                            data->signal_change.current_noise,
+                            data->signal_change.data.current_tx_rate);
                wpa_bss_update_level(wpa_s->current_bss,
                                     data->signal_change.data.signal);
                bgscan_notify_signal_change(