DL6ER
1a32cb65de
Add a few micro-optimizations to enhance speed of the parseList function and transform FQDN to domains. They are equivalent in this context but now they are not considered invalid any longer
...
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-03-30 12:43:11 +02:00
DL6ER
6a1de9fdc0
Merge pull request #1546 from Smarre/build_fixes
...
Fix variable declaration
2023-03-27 20:39:43 +02:00
DL6ER
16239f5baa
Merge pull request #1548 from pi-hole/dependabot-github_actions-development-actions-checkout-3.5.0
...
Bump actions/checkout from 3.4.0 to 3.5.0
2023-03-26 16:17:14 +02:00
DL6ER
aa0ead74f4
Merge pull request #1547 from pi-hole/dependabot-github_actions-development-actions-stale-8.0.0
...
Bump actions/stale from 7.0.0 to 8.0.0
2023-03-26 16:06:05 +02:00
DL6ER
e6ba74c65e
Store in the database instead of into a temporary file
...
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-03-26 13:40:13 +02:00
DL6ER
19c4984ad2
Enhance speed for ABP patterns (don't try to match domains when the line starts in "|")
...
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-03-25 19:37:27 +01:00
DL6ER
1097d75cb5
Only match full lines in input file
...
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-03-25 19:02:04 +01:00
DL6ER
688e1d5112
Add gravity parseList funtion to FTL
...
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-03-25 18:07:02 +01:00
dependabot[bot]
5ad479b628
Bump actions/checkout from 3.4.0 to 3.5.0
...
Bumps [actions/checkout](https://github.com/actions/checkout ) from 3.4.0 to 3.5.0.
- [Release notes](https://github.com/actions/checkout/releases )
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md )
- [Commits](https://github.com/actions/checkout/compare/v3.4.0...v3.5.0 )
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2023-03-25 10:56:49 +00:00
dependabot[bot]
28ec1f04c4
Bump actions/stale from 7.0.0 to 8.0.0
...
Bumps [actions/stale](https://github.com/actions/stale ) from 7.0.0 to 8.0.0.
- [Release notes](https://github.com/actions/stale/releases )
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md )
- [Commits](https://github.com/actions/stale/compare/v7.0.0...v8.0.0 )
---
updated-dependencies:
- dependency-name: actions/stale
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
2023-03-25 10:56:46 +00:00
Samu Voutilainen
2f29edb8be
Correct declaration for blockingstatus variable.
...
Signed-off-by: Samu Voutilainen <smar@smar.fi>
2023-03-24 07:02:01 +02:00
Samu Voutilainen
094f33a8c2
Correct declaration for query_blocked().
...
Fixes build on OpenSUSE Tumbleweed.
Signed-off-by: Samu Voutilainen <smar@smar.fi>
2023-03-24 07:01:58 +02:00
DL6ER
85df4de8af
Merge pull request #1544 from pi-hole/master
...
Sync master back into development
2023-03-22 22:32:44 +01:00
Adam Warner
eb1978910d
Merge pull request #1542 from pi-hole/development
...
Release v5.22
2023-03-22 21:21:35 +00:00
Adam Warner
e408bd9e2d
Merge pull request #1543 from pi-hole/update/dnsmasq
...
Update embedded dnsmasq
2023-03-22 21:08:24 +00:00
Adam Warner
09faadba8f
Merge pull request #1540 from pi-hole/dependabot-github_actions-development-actions-checkout-3.4.0
...
Bump actions/checkout from 3.3.0 to 3.4.0
2023-03-22 21:08:11 +00:00
dependabot[bot]
ddd56d70db
Bump actions/checkout from 3.3.0 to 3.4.0
...
Bumps [actions/checkout](https://github.com/actions/checkout ) from 3.3.0 to 3.4.0.
- [Release notes](https://github.com/actions/checkout/releases )
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md )
- [Commits](https://github.com/actions/checkout/compare/v3.3.0...v3.4.0 )
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2023-03-22 20:56:24 +00:00
DL6ER
fe0339a3a2
Update dnsmasq version to pi-hole-v2.89-9461807
...
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-03-22 21:55:23 +01:00
DL6ER
d35edd4840
Merge pull request #1536 from MichaIng/development
...
Add RISC-V 64-bit support and builds
2023-03-20 20:46:54 +01:00
DL6ER
5f91e6100c
Merge pull request #1541 from pi-hole/fix/spell-checker
...
Fix spell checker action
2023-03-20 20:45:55 +01:00
MichaIng
017e086c1c
Add RISC-V 64-bit support and builds
...
Signed-off-by: MichaIng <micha@dietpi.com>
2023-03-20 20:03:19 +01:00
DL6ER
e08f118bba
Add .codespellignore file to fix spell-checker action
...
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-03-20 19:46:09 +01:00
Simon Kelley
cf20043aab
Remove limitation on --dynamic-host.
...
Dynamic-host was implemented to ignore interface addresses with /32
(or /128 for IPv6) prefix lengths, since they are not useful for
synthesising addresses.
Due to a bug before 2.88, this didn't work for IPv4, and some have
used --dynamic-host=example.com,0.0.0.0,eth0 to do the equivalent of
--interface-name for such interfaces. When the bug was fixed in 2.88
these uses broke.
Since this behaviour seems to violate the principle of least surprise,
and since the 2.88 fix is breaking existing imstallations, this
commit removes the check on /32 and /128 prefix lengths to solve both
problems.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-03-18 13:59:07 +01:00
Simon Kelley
8d130417f4
Fix DHCPv6 "use multicast" response which previously failed to set the message type correctly.
...
Thanks to Petr Menšík for spotting the problem.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-03-18 13:59:03 +01:00
Clayton Craft
e57b84be66
Allow configuring filter-A/AAAA via dbus.
...
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-03-18 13:58:46 +01:00
Simon Kelley
16b711dd1c
Generalise cached NXDOMAIN replies.
...
We can cache an NXDOMAIN reply to a query for any RRTYPE
and reply from a cached NXDOMAIN to any RRTYPE.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-03-18 13:58:46 +01:00
Simon Kelley
e5c5a34dd7
Set the default maximum DNS UDP packet size to 1232.
...
http://www.dnsflagday.net/2020/ refers.
Thanks to Xiang Li for the prompt.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-03-18 13:58:46 +01:00
Simon Kelley
4f2fd40c7d
Fix possible SEGV when no servers defined.
...
If there exists a --address=/<domain>/ or --server=/<domain>/#
configuration but no upstream server config unqualified by
domain then when a query which doesnt match the domain is
recieved it will use the qualfied server config and in the process
possibly make an out-of-bounds memory access.
Thanks to Daniel Danzberger for spotting the bug.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-03-18 13:58:46 +01:00
Dominik Derigs
d7883c53dd
Fix --rev-server option. It was broken in 1db9943c6879c160a5fbef885d5ceadd3668b74d when resolving upstream servers by name was extended to --rev-server without accounting for the fact that re-using one and the same upstream server for each of the x.y.z.in-addr.arpa is actually a wanted feature
...
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-03-18 13:58:46 +01:00
Taylor R Campbell
e343086ca5
Avoid undefined behaviour with the ctype(3) functions.
...
As defined in the C standard:
In all cases the argument is an int, the value of which shall
be representable as an unsigned char or shall equal the value
of the macro EOF. If the argument has any other value, the
behavior is undefined.
This is because they're designed to work with the int values returned
by getc or fgetc; they need extra work to handle a char value.
If EOF is -1 (as it almost always is), with 8-bit bytes, the allowed
inputs to the ctype(3) functions are:
{-1, 0, 1, 2, 3, ..., 255}.
However, on platforms where char is signed, such as x86 with the
usual ABI, code like
char *arg = ...;
... isspace(*arg) ...
may pass in values in the range:
{-128, -127, -126, ..., -2, -1, 0, 1, ..., 127}.
This has two problems:
1. Inputs in the set {-128, -127, -126, ..., -2} are forbidden.
2. The non-EOF byte 0xff is conflated with the value EOF = -1, so
even though the input is not forbidden, it may give the wrong
answer.
Casting char to int first before passing the result to ctype(3)
doesn't help: inputs like -128 are unchanged by this cast. It is
necessary to cast char inputs to unsigned char first; you can then
cast to int if you like but there's no need because the functions
will always convert the argument to int by definition. So the above
fragment needs to be:
char *arg = ...;
... isspace((unsigned char)*arg) ...
This patch inserts unsigned char casts where necessary, and changes
int casts to unsigned char casts where the input is char.
I left alone int casts where the input is unsigned char already --
they're not immediately harmful, although they would have the effect
of suppressing some compiler warnings if the input is ever changed to
be char instead of unsigned char, so it might be better to remove
those casts too.
I also left alone calls where the input is int to begin with because
it came from getc; casting to unsigned char here would be wrong, of
course.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-03-18 13:58:43 +01:00
DL6ER
a9bede4444
Merge pull request #1539 from pi-hole/tweak/no-ident
...
Put version.ftl also behind new no-ident config option
2023-03-15 16:35:52 -04:00
DL6ER
f4cd2b4e98
Put version.ftl also behind new no-ident config option
...
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-03-15 21:31:12 +01:00
DL6ER
b87ef114ef
Merge pull request #1532 from pi-hole/new/adb_style_blocking
...
Add support for Adblock Plus domain lists
2023-03-11 15:18:29 -05:00
DL6ER
5a15f9be07
Merge pull request #1537 from pi-hole/update/sqlite_3.41.1
...
Update embedded SQLite to 3.41.1
2023-03-11 15:17:32 -05:00
DL6ER
62ebd05496
Apply Pi-hole SQLite3 patches
...
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-03-11 07:52:57 +01:00
DL6ER
1fe7bb6946
Update embedded SQLite3 engine to version 3.41.1
...
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-03-11 07:45:25 +01:00
DL6ER
da118e87ce
Remove last traces of temporarily added benchmarking tools. Also remove the hint about ABP domains, this can easily be checked in gravity
...
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-03-05 13:56:55 +01:00
DL6ER
06f0e0340e
Remove debugging timing output
...
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-02-26 16:52:23 +01:00
DL6ER
ae9b291082
Set abp_domains = 1 during the CI tests.
...
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-02-26 07:19:48 +01:00
DL6ER
ab2f652e22
Use property "abp_domains" from info table to decide whether ABP blocking is to be used or not. Also log when FTL enabled ABP-style blocking
...
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-02-25 22:29:17 +01:00
DL6ER
ec82cd3dd4
Add timing for ABP style detection
...
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-02-25 18:37:40 +01:00
Dan Schaper
6f8ba76077
Update src/database/gravity-db.c
...
Spespellingllling
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2023-02-15 14:01:37 -08:00
Christian König
d9c753be27
Fix spellcheck to get things deployed
...
Signed-off-by: Christian König <ckoenig@posteo.de>
2023-02-15 21:55:47 +01:00
DL6ER
80b5fa008c
Fix handling of rare (but possible) gravity database issues such as "list not available"
...
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-02-15 21:27:12 +01:00
DL6ER
75cd6913ee
Do not use a new option but instead automatically detect if ABP-style domains are present in the database. This ensures that this addition comes at no extra costs to any installs using pure HOSTS-style adlists.
...
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-02-15 21:19:31 +01:00
DL6ER
8794b1684d
Add ABP format blocking support for gravity. Note that the option needs to be switched on by setting GRAVITY_ABP_STYLE=true in pihole-FTL.conf to avoid running this computationally expensive task on the vast majority of user databases only fed from properly formatted HOSTS lists. Gravity can enable the setting when it detects ABP format automatically.
...
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-02-15 19:48:19 +01:00
DL6ER
6b2c02fd54
Merge pull request #1530 from pi-hole/master
...
Sync master back into development
2023-02-11 08:18:33 +01:00
Adam Warner
f380afda32
Merge pull request #1528 from pi-hole/development
...
Pi-hole FTL v5.21
2023-02-10 18:55:28 +00:00
DL6ER
a8a75d86e6
Merge pull request #1522 from pi-hole/update/dnsmasq
...
Update embedded dnsmasq to v2.89
2023-02-07 19:42:45 +01:00
DL6ER
6edb071f54
Update dnsmasq version to 2.89
...
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-02-06 21:16:23 +01:00