Bug 13982

Summary: LUA-CSV breaks on empty files
Product: IPFire Reporter: Stefan Schantl <stefan.schantl>
Component: ---Assignee: Michael Tremer <michael.tremer>
Status: MODIFIED --- QA Contact:
Severity: - Unknown -    
Priority: - Unknown - CC: adolf.belka, michael.tremer
Version: 2   
Hardware: unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 13972    

Description Stefan Schantl 2026-05-23 13:06:01 UTC
When trying to start the knot-resolver on the latest (first) ISO image, it cannot be started properly in case any of the related settings files located in "/var/ipfire/*" is empty.

In this case the "config.lua" script fails because "csv.lua" return a nil value.

Log output:
May 23 14:51:35 ipfire kresd[6771]: [system] error while loading config: /usr/lib/knot-resolver/config.lua:205: /usr/share/lua/5.1/csv.lua:215: attempt to concatenate local 'sep' (a nil value) (workdir '/run/knot-resolver')
Comment 1 Adolf Belka 2026-05-23 14:14:12 UTC
*** Bug 13985 has been marked as a duplicate of this bug. ***
Comment 2 Michael Tremer 2026-05-26 15:28:49 UTC
I could not reproduce this at all, but it might be that my test system is not very close to what is actually in next. Could you please check if this fixes the problem?

> https://git.ipfire.org/?p=ipfire-2.x.git;a=commitdiff;h=e1bf897a9ec75f5dd49d4abda4a1aaac0019a98e
Comment 3 Stefan Schantl 2026-05-26 19:20:45 UTC
Hello Michael,

I can confirm that with the latest changes on the config.lua file the resolver now starts successfully even there are empty settings files.
Comment 4 Adolf Belka 2026-05-27 10:56:43 UTC
With Development Build: next/9a45c759

I can confirm that knot now starts and stays running after booting.