Line numbers given for config errors are wrong/confusing
I am running rtrtr v0.2.2 on Debian 11.
I have a small config file with an "invalid IP address" for the http-listen directive, that uses a domain instead of an address:
log_level = "debug"
log_target = "stderr"
log_facility = "daemon"
log_file = "/var/log/rtrtr.log"
http-listen = ["localhost:8080"]
# JSON UNIT
[units.rpki-client]
type = "json"
uri = "file:///var/lib/rpki-client/json"
refresh = 60
# RTR TARGET
[targets.default]
type = "rtr"
listen = [ "127.0.0.1:9001"]
unit = "rpki-client"
When I execute it, rtrtr says:
root@rpki-1:~# rtrtr -v --config minimal.conf
/root/minimal.conf: invalid IP address syntax at line 17 column 1
However line 17 is not the http-listen directive, it is the targets.default block which leads a user to believe that the IP address in the listen directive in the target is invalid.
I would have expected something like invalid IP address syntax at line 6 where the actual wrong directive is.
Thank you for the report and apologies for the embarrassingly late response.
Unfortunately, these line numbers are generated in an underlying library and not easily fixable. I switched to a newer version but now it just says “line 1 column 1” all the time.
So we will need to redo the configuration parsing as part of the next release.