DL6ER
|
4c74a29f87
|
Add shared per-client regex array. This ensures TCP and UDP workers know the same details about client/regex combinations. This commit also fixes an issue with regex group associations for configured clients that have no assigned group.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-12-30 17:14:40 +00:00 |
|
DL6ER
|
c9c7c27888
|
Add shared DNS cache for FTL. This cache is shared across forks and can be used by TCP and UDP clients avoiding any doubled amount of work.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-12-30 14:08:22 +00:00 |
|
DL6ER
|
45b5b0e0f6
|
Merge pull request #668 from pi-hole/fix/deep_CNAME_blocking_top_lists
Top lists fix for deeply blocked CNAME chains
|
2019-12-28 16:56:23 +01:00 |
|
DL6ER
|
8e46afcb63
|
Merge pull request #667 from pi-hole/fix/test_suite
Fix two testing errors
|
2019-12-28 16:55:55 +01:00 |
|
DL6ER
|
9cc4e0d76f
|
Merge pull request #670 from pi-hole/tweak/CNAME_inspection
Tweak CNAME whitelisting behavior
|
2019-12-28 16:50:59 +01:00 |
|
DL6ER
|
bdfd955675
|
Merge pull request #671 from pi-hole/fix/chown/shm-files
Change ownership of all shared memory objects before switching user
|
2019-12-28 16:48:24 +01:00 |
|
DL6ER
|
b0f0e9ac68
|
Set query as whitelist permitted when the domain is already known to FTL.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-12-27 23:29:33 +00:00 |
|
DL6ER
|
8604804a19
|
Change ownership of all shared memory objects before switching user.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-12-27 22:42:15 +00:00 |
|
DL6ER
|
a4f4a09a22
|
Implement a query-wide whitelisted property that can hold the to-be-permitted property during an entire CNAME inspection process.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-12-27 21:32:19 +00:00 |
|
DL6ER
|
36c491791d
|
Explicitly store domains as being whitelisted in FTLs cache for using this information during possible later CNAME inspection. This avoids the necessity to check the whitelist filters multiple times.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-12-27 21:11:39 +00:00 |
|
DL6ER
|
e15d9504ce
|
If we find during a CNAME inspection that we want to block the entire chain, the originally queried domain itself was not counted as blocked (but as (permitted). Later in the chain, when we find that this is a bad guy, we short-circuit it. We need to correct the domain counter of the domain at the head of the chain, otherwise, the data for the top lists is misleading. For this, we go back the entire path and change the original request to blocked by increasing the blocked count of this domain by one. Fortunately, each CNAME path can easily be tracked back to the original head in FTL's data so we do not need to search it. This makes the change able to happen without causing any delay.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-12-21 11:10:43 +00:00 |
|
DL6ER
|
b6d74c701c
|
Fix two testing errors.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-12-18 22:13:07 +00:00 |
|
DL6ER
|
bb9f25cb85
|
Merge pull request #664 from pi-hole/new/group_zero
Add group zero support
|
2019-12-18 22:36:46 +01:00 |
|
Mark Drobnak
|
b536bf05f9
|
Merge pull request #666 from pi-hole/tweak/no_resolve
Do not try to resolve client host names during the tests
|
2019-12-18 12:23:33 -05:00 |
|
DL6ER
|
d752539a6f
|
Do not try to resolve client host names during the tests. This occasionally leads to false-negatives during the CI testing (the CI cannot always resolve the hostnames).
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-12-18 10:01:12 +00:00 |
|
DL6ER
|
83018ac1dd
|
Merge pull request #663 from pi-hole/new/CNAME_DEEP_INSPECT
Add CNAME_DEEP_INSPECT config option
|
2019-12-12 21:37:01 +01:00 |
|
DL6ER
|
80584788ad
|
Add new zero-group-specific tests (domain associated ONLY to a particular query is only seen by this client).
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-12-12 17:51:44 +00:00 |
|
DL6ER
|
5637d132bf
|
Update FTL gravity.db.sql template to gravity database version 7.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-12-12 17:42:26 +00:00 |
|
DL6ER
|
33940f2cf2
|
Add group zero support.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-12-12 17:24:12 +00:00 |
|
DL6ER
|
699f25d3ba
|
Add CNAME_DEEP_INSPECT config option (default: true). It can be used to disable deep CNAME inspection. This might be beneficial for very low-end devices.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-12-12 12:43:04 +00:00 |
|
DL6ER
|
dc2c3c9802
|
Merge pull request #642 from pi-hole/new/internal-blocking
Per-client blocking rules, intermediate CNAME path blocking and some more
|
2019-12-12 09:48:57 +01:00 |
|
DL6ER
|
c2755d895a
|
Merge branch 'development' into new/internal-blocking
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-12-11 21:32:35 +00:00 |
|
DL6ER
|
841719e593
|
Merge branch 'development' of github.com:pi-hole/FTL into development
|
2019-12-11 21:31:04 +00:00 |
|
DL6ER
|
7a1705f361
|
Merge pull request #661 from pi-hole/new/DEBUG_DNSMASQ_LINES
Add DEBUG_DNSMASQ_LINES debug flag
|
2019-12-11 22:30:47 +01:00 |
|
DL6ER
|
8d28bf4b55
|
Remove commented out generic vector implementation.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-12-11 21:19:41 +00:00 |
|
DL6ER
|
32d013b457
|
Add DEBUG_DNSMASQ_LINES debug flag
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-12-10 11:12:17 +00:00 |
|
DL6ER
|
57bcb4d7a5
|
Add DEBUG_DNSMASQ_LINES debug flag
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-12-10 10:55:59 +00:00 |
|
DL6ER
|
997d9f9963
|
Reload all lists (but do not clear the DNS cache itself) on receipt of real-time signal 0.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-12-02 15:37:31 +00:00 |
|
DL6ER
|
00c5f24ce7
|
Use sigaction() instead of signal() for portability reasons (recommended by man signal(2)).
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-12-02 15:26:29 +00:00 |
|
DL6ER
|
f6dd4fac39
|
Implement real-time signals.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-12-02 15:26:18 +00:00 |
|
DL6ER
|
66da0df26a
|
Remove unsafe loop instruction.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-11-28 17:21:26 +01:00 |
|
DL6ER
|
5e60930e70
|
Only initialize regex associations when dnsmasq is ready (otherwise, we're still in history reading mode)
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-11-28 17:18:25 +01:00 |
|
DL6ER
|
9d65dd566f
|
Check if gravity database is available before trying to use it in get_client_groupids().
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-11-28 09:18:07 +01:00 |
|
DL6ER
|
d9b84d83e2
|
Merge branch 'development' into new/internal-blocking
|
2019-11-27 00:20:25 +01:00 |
|
DL6ER
|
a21faf2c78
|
Merge pull request #660 from pi-hole/MillionsOfCherries-CherriesForMe-Ok-JustOne
Millions of cherries cherries for me ok just one
|
2019-11-27 00:20:02 +01:00 |
|
Dan Schaper
|
b8d60ffbd2
|
Upload our builds from FTL.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
|
2019-11-26 23:13:03 +00:00 |
|
Dan Schaper
|
26d654366b
|
Upload all builds.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
|
2019-11-26 23:12:51 +00:00 |
|
DL6ER
|
8752400609
|
Ensure domains encountered while following CNAME paths are not double-counted.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-11-25 13:44:23 +01:00 |
|
DL6ER
|
2e97d2e6cd
|
Implement CNAME path walking. If any domain along a returned CNAME path is found in any of Pi-hole's blocking lists (and is not whitelisted), the entire query will be answered with NODATA.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-11-25 12:42:54 +01:00 |
|
DL6ER
|
68aef3f0c4
|
Ensure shared memory is not already destroyed when calling gravityDB_close().
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-11-25 10:05:03 +01:00 |
|
DL6ER
|
cc2991aebe
|
Slightly reduce code duplication and add some more comments to _FTL_check_blocking()
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-11-25 09:39:14 +01:00 |
|
DL6ER
|
11159d1c40
|
Increase shared memory version due to the new (FTL-private) field clientstatus in domainsData.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-11-24 09:50:10 +01:00 |
|
DL6ER
|
e0dc41c76b
|
Also reset per-client domain data on receipt of SIGHUP. The user expects all cache to be cleared on this signal.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-11-23 23:00:18 +01:00 |
|
DL6ER
|
f9be16e61b
|
Reset per-client domain blocking cache at receipt of SIGUSR2. This is a convenient alternative to sending SIGHUP (which also clears the entire DNS cache).
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-11-23 22:55:57 +01:00 |
|
DL6ER
|
4269897b58
|
Fix: Only set domain as not-to-be-blocked when this is true.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-11-22 10:42:12 +01:00 |
|
DL6ER
|
7fc340c16a
|
Add more debugging output.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-11-22 10:24:58 +01:00 |
|
DL6ER
|
25a403a7c4
|
Remove static instruction from query_blocked() as it is called from places that are unlikely to reach (however, still possible). Let the compiler decide itself whether and where it wants to inline this function.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-11-22 09:58:26 +01:00 |
|
DL6ER
|
faac7005d1
|
Improve performance significantly. We store if (and if: why) a certain domain was blocked for any requesting client and can immediately reply similarly if the same client requests the same domain again. This reduces the O(N^3) problem (number of queries * number of domains * number of clients) to a O(N^2) problem (domains * clients). Note that this state of the code still lacks a possibility to reset when entries in the database have changed. For this, we still have to send either SIGHUP (drawback: clears the cache) or define a new signal for it.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-11-22 09:42:06 +01:00 |
|
DL6ER
|
7fd801dbc2
|
Add pure attribute to vGet() to signal that this function might be eliminated without consequences in static data flow analysis.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-11-21 12:18:53 +01:00 |
|
DL6ER
|
0baa56c3c3
|
Add a generic dynamic vector implementation. I tested my implementation using gdb and also against valgrind to ensure there are no memory leaks.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-11-21 12:12:26 +01:00 |
|