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

Bug in Unbound Migration Handling of Boolean Values from OPNsense 21.1 #6550

Closed
2 tasks done
utkonos opened this issue May 7, 2023 · 1 comment
Closed
2 tasks done
Assignees
Labels
bug Production bug
Milestone

Comments

@utkonos
Copy link

utkonos commented May 7, 2023

Important notices

Before you add a new report, we ask you kindly to acknowledge the following:

Describe the bug

Earlier versions of OPNsense used "on" rather than "1" in the config.xml. These config entries are causing an error in the Unbound migration in recent OPNsense updates.

To Reproduce

Steps to reproduce the behavior:

  1. Install OPNsense from the official ISO for version 21.1: OPNsense-21.1-OpenSSL-dvd-amd64.iso
  2. During a plain vanilla install's initial wizard, check the unbound settings that enable DNSSEC configurations.
  3. Observe the "on" fields that are added to the config.xml by the wizard.
  4. Upgrade to the current version of OPNsense and look in the logs for the error quoted below.

Expected behavior

The current migrations should be able to handle these "on" fields correctly and update them to "1" as is used as the boolean value in config.xml elsewhere.

Describe alternatives you considered

I can manually change these values, but they were created by the OPNsense software itself, so therefore should be handled properly without error in recent updates.

Screenshots

Screenshot 2023-05-06 at 22 01 41

Screenshot 2023-05-06 at 22 01 59

Relevant log files

2023-05-07T00:49:33 | Error | config | #2 {main} ) |  
-- | -- | -- | -- | --
2023-05-07T00:49:33 | Error | config | #1 /usr/local/opnsense/mvc/script/run_migrations.php(54): OPNsense\Base\BaseModel->runMigrations() |  
2023-05-07T00:49:33 | Error | config | #0 /usr/local/opnsense/mvc/app/models/OPNsense/Base/BaseModel.php(704): OPNsense\Base\BaseModel->serializeToConfig() |  
2023-05-07T00:49:33 | Error | config | Stack trace: |  
2023-05-07T00:49:33 | Error | config | in /usr/local/opnsense/mvc/app/models/OPNsense/Base/BaseModel.php:583 |  
2023-05-07T00:49:33 | Error | config | [2023-05-07T00:49:33+00:00][ERROR] Model OPNsense\Unbound\Unbound can't be saved, skip ( OPNsense\Phalcon\Filter\Validation\Exception: [OPNsense\Unbound\Unbound:advanced.dnssecstripped] value should be a boolean (0,1){on} |  
2023-05-07T00:49:33 | Error | config | [2023-05-07T00:49:33+00:00][ERROR] [OPNsense\Unbound\Unbound:advanced.dnssecstripped] value should be a boolean (0,1){on}

Environment

Software version used and hardware type if relevant, e.g.:

OPNsense 21.1 (amd64, OpenSSL)
upgraded to
OPNsense 23.1 (amd64, OpenSSL)

@fichtner
Copy link
Member

fichtner commented May 7, 2023

Thanks for the report. The ‚on‘ originated from wizard use which has already been fixed in 0192217 but this is obviously related since the config values can persist. I‘ll take a look tomorrow.

@fichtner fichtner self-assigned this May 7, 2023
@fichtner fichtner added the bug Production bug label May 7, 2023
@fichtner fichtner added this to the 23.7 milestone May 7, 2023
fichtner added a commit that referenced this issue May 8, 2023
fichtner added a commit that referenced this issue May 8, 2023
fichtner added a commit that referenced this issue May 8, 2023
@fichtner fichtner closed this as completed May 8, 2023
fichtner added a commit that referenced this issue May 8, 2023
(cherry picked from commit 378d9a3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Production bug
Development

No branches or pull requests

2 participants