File: 0019-Send-CTRL-EVENT-SIGNAL-CHANGE-message-to-control-int.patch

package info (click to toggle)
wpa 2%3A2.10-25
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 21,300 kB
  • sloc: ansic: 394,694; cpp: 5,200; python: 4,144; makefile: 3,591; sh: 1,460; php: 966; xml: 54; perl: 48
file content (45 lines) | stat: -rw-r--r-- 1,831 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
From: Kan-Ru Chen <kanru@kanru.info>
Date: Mon, 23 Dec 2024 08:42:33 +0900
Subject: Send CTRL-EVENT-SIGNAL-CHANGE message to control interfaces only

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>

Origin: backport, https://w1.fi/cgit/hostap/commit/?id=c330b5820eefa8e703dbce7278c2a62d9c69166a
---
 wpa_supplicant/events.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index f55e184..25b0c24 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -5447,12 +5447,12 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
 					data->eapol_rx.data_len);
 		break;
 	case EVENT_SIGNAL_CHANGE:
-		wpa_msg(wpa_s, MSG_INFO, WPA_EVENT_SIGNAL_CHANGE
-			"above=%d signal=%d noise=%d txrate=%d",
-			data->signal_change.above_threshold,
-			data->signal_change.current_signal,
-			data->signal_change.current_noise,
-			data->signal_change.current_txrate);
+		wpa_msg_ctrl(wpa_s, MSG_INFO, WPA_EVENT_SIGNAL_CHANGE
+				"above=%d signal=%d noise=%d txrate=%d",
+				data->signal_change.above_threshold,
+				data->signal_change.current_signal,
+				data->signal_change.current_noise,
+				data->signal_change.current_txrate);
 		wpa_bss_update_level(wpa_s->current_bss,
 				     data->signal_change.current_signal);
 		bgscan_notify_signal_change(