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

pfBNG: Add a work-around for Bug #6603 #395

Merged
merged 4 commits into from
Aug 23, 2017

Conversation

doktornotor
Copy link
Contributor

Prevents unbound from bombing out when the file does not exist (Bug #6603). Note that the same issue completely breaks fresh 2.4 installs when you restore a config with pfBNG's DNSBL feature enabled due to Bug #7604.

@BBcan177 - do whatever you want with this; I'm simply fed up with this issue.

Alternative solution for pfSense itself suggested in Bug #6603 comment 11 however I can see a problem with that due to the server: clause being required for some options, while not for others, so, a mere include: /var/unbound/conf.d/*.conf in default unbound.conf does not seem exactly viable (and skipping it when required would break unbound start as well.)

doktornotor added 2 commits August 18, 2017 17:28
Prevents unbound from bombing out when the file does not exist.
Copy link
Contributor

@jim-p jim-p left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a good and reasonable fix to me

@doktornotor
Copy link
Contributor Author

The real solution I could see here would be somewhere along the lines of implementing includeifexists: /foo/bar/baz.conf in Unbound itself, or simply making the failed include non-fatal there. Nothing that would get solved short-term unfortunately. 😞

@jim-p
Copy link
Contributor

jim-p commented Aug 18, 2017

I think letting a glob handle the work here is good enough for now, also this would allow splitting directives into multiple files if needed without having to specify them all individually.

@doktornotor
Copy link
Contributor Author

Yeah I guess the glob is the best solution for now; there's also some touch() code already in there, but that doesn't help with 7604 at all -- simply since the packages get started way too late for it to be of any use.

@BBcan177
Copy link
Contributor

BBcan177 commented Aug 19, 2017

I haven't tested this patch and will not be able to test for another 2-3 weeks. However, it should be ok to merge with the changes indicated below.

Please test it fully and if it breaks, please fix it promptly :)

The glob might need to be changed to .*conf as there are other pfb_dnsbl.??? files that could be in the /var/unbound folder. Should unbound be reloaded during a DNSBL cron update, the following files can be present in the /var/unbound folder and can't be included in the glob.

pfb_dnsbl.raw
pfb_dnsbl.tsp
pfb_dnsbl.dup

If debug mode is enabled in pfblockerng.sh (Next release) there are these file references:

pfb_dnsbl.conf.final
pfb_dnsbl.raw.orig
pfb_dnsbl.bkr
pfb_dnsbl.bkraw

and the following new file indicator:

pfb_dnsbl.reload
  1. In Line 3834 of pfblockerng.inc, this will also need to be changed to reflect the new glob:

    if (isset($conf) && !strstr(implode($conf), 'pfb_dnsbl.conf')) {
    
  2. Please remove the "broken" reference in line 1034 and replace that with "previous".

  3. In Line 1034 of pfblockerng.inc, change the $log = to a $log .= to append the log variable.

Note:

This will also not fix any existing backups that contain the previous pfb_dnsbl.conf reference until a Force Update or Cron event takes place. So it still might result in a failed unbound start in this instance. I still feel that this is best resolved in Unbound to skip a missing include file, or in pfSense Unbound code to touch the include file if not found... <my 2 cents>

Thanks for the patch Dok!

@doktornotor
Copy link
Contributor Author

Changed as requested by @BBcan177.

Regarding existing backups - there's really not much that could be done there unless someone wants to add some magic to /etc/inc/upgrade_config.inc

@netgate-git-updates netgate-git-updates merged commit 0fe7155 into pfsense:devel Aug 23, 2017
@doktornotor doktornotor deleted the patch-2 branch August 23, 2017 19:08
netgate-git-updates pushed a commit that referenced this pull request Jul 5, 2022
Changes since 0.3.0:

We reached v1.0.0

- fix!: Replace limit flag with paginate by @ankitpokhrel in #359
- fix!: Append components on edit instead of overriding by @ankitpokhrel in #368
- feat!: Append label to an issue, show labels at issue list view by @stchar in #300
- refactor!: Move boards and project list to subcommand by @ankitpokhrel in #314

- feat: Support custom fields on issue create by @ankitpokhrel in #319
- feat: Add support to read from .netrc by @adolsalamanca in #329
- feat: Add support for OS keyrings/-chains by @boyvanamstel in #348
- feat: Support auth with personal access tokens by @marek-veber / @ankitpokhrel in #327
- feat: Allow to set fixVersions on issue creation by @ankitpokhrel in #276
- feat: Allow insecure TLS by @ankitpokhrel in #305
- feat: Add --no-browser option to open cmd by @ankitpokhrel in #308
- feat: Add search option for boards on jira init by @ankitpokhrel in #322
- feat: Add issues unlink command by @sushilkg in #347
- feat: Support refresh for issues list by @GZLiew in #325
- feat: Ability to delete issue by @ankitpokhrel in #336
- feat: Allow to set custom fields on epic create by @ankitpokhrel in #364
- feat: Allow to edit release-info/fixVersions by @ankitpokhrel in #365
- feat: Allow removing labels on edit by @ankitpokhrel in #371
- feat: Support creating issues with custom subtask type by @danobi in #372
- feat: Allow removing component on edit by @ankitpokhrel in #374
- feat: Allow removing fixVersions on edit by @ankitpokhrel in #376
- feat: Support custom fields on issue edit by @ankitpokhrel in #377
- feat: Jira init non-interactive by @ankitpokhrel in #381
- feat: Show subtasks in issue view by @ankitpokhrel in #382
- feat: Allow project filter in raw jql by @ankitpokhrel in #395

- fix: Makefile compatiblity with Make 3.81 by @danmichaelo in #252
- fix: Config generation issue by @ankitpokhrel in #275
- fix(cfg): Strip trailing slash on server name by @ankitpokhrel in #295
- fix: Jira client should respect timeout opt by @ankitpokhrel in #304
- fix: Respect GLAMOUR_STYLE env on issue view by @ankitpokhrel in #317
- fix: Get subtask handle from config by @ankitpokhrel in #296
- fix: Jira wiki parser by @ankitpokhrel in #326
- fix: Display correctly columns in list sprint command help by @adolsalamanca in #320
- fix: Panic on empty sub-list by @ankitpokhrel in #330
- fix: Issue with assigning user by @ankitpokhrel in #321
- fix: OOM bug on issue view by @ankitpokhrel in #350
- fix: Assign parent key as is on edit by @ankitpokhrel in #351
- fix: Add additional check for total boards returned by @ankitpokhrel in #360
- fix: Issue with query param in user assignment by @ankitpokhrel in #380
- fix: Subtask clone by @ankitpokhrel in #383
- fix: editing issue with custom field in non interactive mode by @DrudgeRajen in #391

- dep: Upgrade charmbracelet/glamour to 0.5.0 by @ankitpokhrel in #309
- dep: Upgrade rivo/tview to latest by @ankitpokhrel in #310
- dep: Upgrade outdated packages by @ankitpokhrel in #311
- dep: Upgrade cobra to 1.4.0 by @ankitpokhrel in #373

- Use md ext for tmp file to trigger vim syntax by @ElementalWarrior in #318

Full Changelog: ankitpokhrel/jira-cli@v0.3.0...v1.0.0
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.

4 participants