[nsd-users] include order

Andreas Schwarz andreas at black-code.de
Wed Sep 25 12:15:53 UTC 2019


Hi

I am having a strange behavior when using the include directive with globbing.

The intention is, to have some "conf.d", where I have my configuration files. The configuration files are prefixed with a number, e.g.

10-test.conf -> Content "foo"
20-test.conf -> Content "bar"

I would expect NSD to include the files in this order. However, restarting the service or running nsd-checkconf tells me this:

/etc/nsd/conf.d/20-test.conf:1: at 'bar': error: syntax error
read /etc/nsd/nsd.conf failed: 1 errors in configuration file

I tried several other prefixes (number or letter).
It looks like the files are parsed in a somewhat arbitrary order. I can reproduce this with the NSD packages from several distributions, Debian 9, Debian 10, CentOS 7, Arch ...

I found this line in the lexer
https://github.com/NLnetLabs/nsd/blob/master/configlexer.lex#L124
which to me indicates, that a sorted/predictable outcome for including files is desired and should work.

Is this me doing something wrong? Can anyone else reproduce/explain this behaviour?

Best regards
Andreas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nlnetlabs.nl/pipermail/nsd-users/attachments/20190925/158f3eb4/attachment.htm>


More information about the nsd-users mailing list