]> git.ipfire.org Git - thirdparty/unbound.git/commit
config: improve handling of unknown modules 901/head
authorSergei Trofimovich <slyich@gmail.com>
Mon, 19 Jun 2023 16:52:49 +0000 (17:52 +0100)
committerSergei Trofimovich <slyich@gmail.com>
Mon, 19 Jun 2023 17:20:22 +0000 (18:20 +0100)
commitd10a889a686175ad48ab95ed190ab877047196ee
treece45d5592fef40c9791c674b368263236a7ee7c7
parent64476280ed511a44505a398866cba2204c46b435
config: improve handling of unknown modules

The change fixes module print when specified module is unknown. On
example config:

    server:
      module-config: "respip valdator iterator"

Before the change printed error looked like:

    error: Unknown value in module-config, module: ''. This module is
    not present (not compiled in), See the list of linked modules with
    unbound -V

After the change module is printed as expected:

    error: Unknown value in module-config, module: 'valdator'. This
    module is not present (not compiled in), See the list of linked
    modules with unbound -V

Module truncation happens because parse error does not guarantee that
leading whitespace is removed by `module_factory()` call.

The change always removes leading whitespace (if present).
services/modstack.c