From: Álvaro Fernández Rojas Date: Wed, 22 Oct 2025 14:32:23 +0000 (+0200) Subject: config: properly set log level from uci X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=bf61370923466884160ae7a7ee6600f1baff4271;p=project%2Fodhcpd.git config: properly set log level from uci The condition to set the log level from the uci config if it hadn't been set from the command line should be inverted to work properly. Signed-off-by: Álvaro Fernández Rojas --- diff --git a/src/config.c b/src/config.c index 6a33b7c..3e916ad 100644 --- a/src/config.c +++ b/src/config.c @@ -453,7 +453,7 @@ static void set_config(struct uci_section *s) if ((c = tb[ODHCPD_ATTR_LOGLEVEL])) { int log_level = (blobmsg_get_u32(c) & LOG_PRIMASK); - if (config.log_level != log_level && config.log_level_cmdline) { + if (config.log_level != log_level && !config.log_level_cmdline) { config.log_level = log_level; if (config.log_syslog) setlogmask(LOG_UPTO(config.log_level));