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

Fix/privacy levels regex filtering #417

Merged
merged 5 commits into from
Nov 10, 2018

Conversation

DL6ER
Copy link
Member

@DL6ER DL6ER commented Nov 9, 2018

By submitting this pull request, I confirm the following (please check boxes, eg [X]) Failure to fill the template will close your PR:

Please submit all pull requests against the development branch. Failure to do so will delay or deny your request

  • I have read and understood the contributors guide.
  • I have checked that another pull request for this purpose does not exist.
  • I have considered, and confirmed that this submission will be valuable to others.
  • I accept that this submission may not be used, and the pull request closed at the will of the maintainer.
  • I give this submission freely, and claim no ownership to its content.

How familiar are you with the codebase?:

10


Fix regex filtering when privacy levels is > 0. This fixes #414

When a new query comes in, we check if we know this domain already.

If so: We check against the regex filters. If one of the filters match, we inject the domain as blocked into our DNS cache.
If not: We continue.

When the same domains is queried another time, we don't evaluate the regex filters any more as we rely on that the query will be quickly replied to from cache.

This usually works fine, however, for a non-zero privacy level, all domains are only stored as hidden in FTL's memory. Accordingly, any subsequent query (after the first )is not validated against the regex filters any more as they all get the same domainID.

This has been fixed.
As a consequence, you cannot lower the privacy level without restarting pihole-FTL!

This template was created based on the work of udemy-dl.

…his required a certain rearrangement of how we handle domains and clients internally.

Signed-off-by: DL6ER <dl6er@dl6er.de>
…n. Lowering the privacy level is possible, but you need to restart pihole-FTL to enable it.

Signed-off-by: DL6ER <dl6er@dl6er.de>
@DL6ER DL6ER added the Bugfix label Nov 9, 2018
@DL6ER DL6ER added this to the v4.1 milestone Nov 9, 2018
…t when using the web interface.

Signed-off-by: DL6ER <dl6er@dl6er.de>
dnsmasq_interface.c Outdated Show resolved Hide resolved
datastructure.c Outdated Show resolved Hide resolved
api.c Outdated Show resolved Hide resolved
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
@DL6ER DL6ER merged commit 2e25dda into release/4.1 Nov 10, 2018
@DL6ER DL6ER deleted the fix/privacy_levels_regex_filtering branch November 10, 2018 19:57
@yubiuser yubiuser mentioned this pull request Nov 30, 2023
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants