]> git.ipfire.org Git - thirdparty/openwrt.git/commit
netifd: ensure netifd_loglevel default value as fallback 21819/head
authorHannu Nyman <hannu.nyman@iki.fi>
Sun, 1 Feb 2026 16:28:57 +0000 (18:28 +0200)
committerRobert Marko <robimarko@gmail.com>
Mon, 2 Feb 2026 08:47:41 +0000 (09:47 +0100)
commitb800595a38fc572340bba9bdb851843d38a88aa5
treeaffdaafeb3fd9fff34ccbde5c3c869dba3cae13f
parentb7cd16dba3259279643705a6bbed21abe1330586
netifd: ensure netifd_loglevel default value as fallback

Commit 168d5af added the possibility to configure netifd logging level.
The option is read from /etc/config/network and validated.
Supposedly the validation sets 2 as default.

But in case of a syntax error in /etc/config/network, the validation
result can be empty. Then the always passed option to netifd is
just '-l' instead of '-l 2'. That crashes netifd and prevents network
from launching.

Add a fallback value to the variable, so that there will always be
a proper value after the '-l' option.

Improves: 168d5af "netifd: add loglevel config option (fixes #18001)"
Fixes: #21816
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
Link: https://github.com/openwrt/openwrt/pull/21819
Signed-off-by: Robert Marko <robimarko@gmail.com>
package/network/config/netifd/files/etc/init.d/network