OpenWrt/LEDE Project

  • Status Unconfirmed
  • Percent Complete
    0%
  • Task Type Bug Report
  • Category Base system
  • Assigned To No-one
  • Operating System All
  • Severity Low
  • Priority Very Low
  • Reported Version openwrt-19.07
  • Due in Version Undecided
  • Due Date Undecided
  • Private
Attached to Project: OpenWrt/LEDE Project
Opened by coelner - 08.07.2020

FS#3218 - hostapd log_level ingored

Model: TP-Link Archer C7 v2
Architecture: Qualcomm Atheros QCA9558 ver 1 rev 0
Firmware Version :OpenWrt 19.07.2 r10947-65030d81f3 / LuCI openwrt-19.07 branch git-20.155.55664-f35803e
Kernel Version: 4.14.171

root@router:/tmp/run# uci show wireless | grep log
wireless.radio0.log_level='3'
wireless.radio1.log_level='3'
root@router:/tmp/run# cat hostapd-phy* | grep log
logger_syslog=127
logger_syslog_level=3
logger_stdout=127
logger_stdout_level=3
logger_syslog=127
logger_syslog_level=3
logger_stdout=127
logger_stdout_level=3
root@router:/tmp/run# hostapd_cli -i wlan0 log_level
Current level: INFO
Timestamp: 0
root@router:/tmp/run# hostapd_cli -i wlan1 log_level
Current level: INFO
Timestamp: 0
root@router:/tmp/run# hostapd_cli -i wlan1-1 log_level
Current level: INFO
Timestamp: 0
root@router:/tmp/run# hostapd_cli -i wlan1-1 log_level 2
FAIL
root@router:/tmp/run# opkg list-installed | grep hostapd
hostapd-common - 2019-08-08-ca8c2bd2-4
hostapd-utils - 2019-08-08-ca8c2bd2-4
root@router:/tmp/run# opkg list-installed | grep wpad
wpad - 2019-08-08-ca8c2bd2-4

Hello, I have a problem with the loglevel of hostapd. However the loglevel get ignored by the daemon and even the direct manipulation over hostapd_cli failed. Because of this the syslog get spammed by all the info messages.
It is predefined here: https://github.com/openwrt/openwrt/blob/openwrt-19.07/package/network/services/hostapd/Config.in But I don’t know why it is unchangeable at all

coelner commented on 25.07.2020 18:01

I build the 19.07.3 version from the github branch and set the default value to 4.

Actually this changes nothing, the ringbuffer from logd contains all messages. That leads me to this topic: https://forum.openwrt.org/t/logd-doesnt-honor-conloglevel-17-01-4-r3560-79f57e422d/8196/7

Raphaël Mélotte commented on 29.07.2020 07:55

I also noticed the log_level is ignored, even if you set it through UCI.
`uci set wireless.radio0.log_level=1` correctly sets it in `/var/run/hostapd_phyX.conf`, but the log level used by hostapd stays the same (INFO).

As for why the hostapd_cli call you pasted doesn't work, it's because it uses the level name instead of a number.
So to set it to level 4, try:

hostapd_cli -i wlan0 log_level ERROR

The available levels are:

Following priority levels are used:
- 0 = MSGDUMP
- 1 = DEBUG
- 2 = INFO
- 3 = WARNING
- 4 = ERROR

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing