knot-resolver: The user is unable to configure it at all.
Nobody has claimed this yet.
- Dominant language
- Makefile
- Stars
- 4.6k
- Forks
- 4k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 134
Description
Package Name
knot-resolver
Maintainer
Jan Pavlinec jan.pavlinec1@gmail.com
OpenWrt Version
SNAPSHOT
OpenWrt Target/Subtarget
mediatek/filogic
Steps to Reproduce
- Install knot-resolver.
- Try to configure it.
Actual Behaviour
You will find there is no way to configure knot-resolver by users. If you see /etc/init.d/kresd, you will find the config file path was gave by -c argument, it's $CONFIGFILE, but this file is in /tmp and generate everytim when kresd start. Until this, there is no issue. BUT, the content of this file is hardcoded in kresd.init (via init_header() and init_rootkey() function), not generated from some files like /etc/config/knot-resolver or some path specified by users.
https://github.com/openwrt/packages/blob/43681b542062fa8cae309fbea2ec4a627f62d107/net/knot-resolver/files/kresd.init#L64-L67
Since knot-resolver supports specify -c option multitime and will load them in order. I recommand the way used by chrony package: there two config files, one is controlled by UCI, one can be editted by users directly. If user only use simple config covered by UCI, it use that file, needn't to learn new syntax. If user need some complex or config not covered by UCI, they can edit file directly. The config file can be edited directly is necessary for knot-resolver, because its config format is a Lua script and there is not limitation for syntax, which means it's impossible to implement all features by a data format (Unless you use something like S-expression, but will be unreadable and not supported by UIC)
https://github.com/openwrt/packages/blob/master/net/chrony/files/chronyd.init
Confirmation Checklist
- The package is maintained in this repository.
- I understand that issues related to the base OpenWrt repository or LuCI repository will be closed.
- I am reporting an issue for OpenWrt, not an unsupported fork.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read net/knot-resolver/files/kresd.init, especially the CONFIGFILE handling and init_header()/init_rootkey() sections, then compare it with net/chrony/files/chronyd.init. Done means users can provide supported settings through UCI and edit a separate Lua configuration for options UCI cannot represent, while kresd loads the resulting configuration files in order.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- networking
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100