Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config: improve handling of unknown modules #901

Merged
merged 1 commit into from Jul 20, 2023
Merged

config: improve handling of unknown modules #901

merged 1 commit into from Jul 20, 2023

Conversation

trofi
Copy link
Contributor

@trofi trofi commented Jun 19, 2023

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).

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).
gthess added a commit that referenced this pull request Jul 20, 2023
@gthess gthess merged commit 862fa0d into NLnetLabs:master Jul 20, 2023
@gthess
Copy link
Member

gthess commented Jul 20, 2023

Thanks!

@trofi trofi deleted the module-error branch July 20, 2023 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants