DL6ER
d3e9365f53
Remove obsolete readGravityFiles() funtion
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-05-26 19:24:34 +02:00
DL6ER
decef2e5fd
Remove special support for old type of wildcard lists as dnsmasq config file
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-05-19 14:46:21 +02:00
DL6ER
d50494b8f4
Get rid of numBlocked file, FTLDNS can now determine number of domains thanks to the new lists format
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-04-21 23:57:25 +02:00
DL6ER
a74cc2d9b6
Prevent possible resource leak
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-03-31 00:43:54 +02:00
DL6ER
c5f34a4dea
Use number of effectively blocked domains from /etc/pihole/numBlocked if available. Fall back to counting number of entries in preEventHorizon if this file is not found (e.g. updated gravity didn't run yet)
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-03-30 21:02:25 +02:00
DL6ER
1c191dd2c2
Read number of blocked domains from preEventHorizon. Solves #246
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-03-30 19:54:17 +02:00
DL6ER
2ae4b52bb3
A number of improvements:
...
- use "extern" for the glibal variable specifications in the header files (and clarif where the variables are actually defined)
- record number of failed requests to forward destinations
- Add dnsmasq_interface.h to DTLDEPS
- Add new request type ">cacheinfo" to get information about cache usage in the resolver
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-02-26 17:24:09 +01:00
DL6ER
ea3309e7b1
Initial commit for FTLDNS
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-02-22 20:21:06 +01:00
DL6ER
e75bd26994
Improve overall memory handling by checking for failed memory allocation events at the places we need the allocated space
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-02-07 13:23:54 +01:00
Mcat12
8adb3d335e
Merge remote-tracking branch 'origin/development' into new/API
...
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2018-01-03 14:35:42 -05:00
DL6ER
372dbca40a
Update comment and use correct string for strlen()
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2017-12-27 00:35:38 +01:00
DL6ER
bc3d1f1c2e
Makes sure wildcard matching is unambigious
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2017-12-27 00:30:43 +01:00
DL6ER
7425c1d700
Continue if exact match was found
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2017-12-27 00:23:37 +01:00
DL6ER
e5e7ff729d
Remove debugging output
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2017-12-27 00:23:10 +01:00
DL6ER
a940e4089b
Use short circuit evolution to shorten statement
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2017-12-23 22:00:26 +01:00
DL6ER
91047f97f1
Accept "*domain.tld" as wildcard audit entry
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2017-12-23 21:54:40 +01:00
Mcat12
604ad7ec39
Merge remote-tracking branch 'origin/development' into new/API
...
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
# Conflicts:
# request.c
# test/test_suite.sh
2017-12-22 23:08:18 -05:00
DL6ER
95f76ad0e4
Detect pihole blocking status and return this on API request
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2017-10-05 17:48:00 +02:00
DL6ER
6cab55125c
Merge branch 'development' into new/API
2017-06-16 12:42:55 +02:00
Mcat12
5c9dce2812
Minus zero isn't a thing
2017-06-15 15:27:47 -04:00
DL6ER
364ad81f10
Merge branch 'development' into new/API
2017-06-15 10:51:50 +02:00
DL6ER
7cef472876
Imporve triming of newline character when reading in the lists.
...
The function strcspn() counts the number of characters until it hits a '\r' or a '\n' (in other words, it finds the first '\r' or '\n').
If it doesn't hit anything, it stops at the '\0' (returning the length of the string).
Note that this works fine even if there is no newline, because strcspn stops at a '\0'.
In that case, the entire line is simply replacing '\0' with '\0'.
2017-06-15 10:27:11 +02:00
DL6ER
aea8b600bb
Reset wildcards counter if wildcard file is created after it has been removed (this is now happening with the latest version of pihole disable/enable) ( #79 )
2017-06-15 09:56:50 +02:00
DL6ER
2bbacbf1c2
Replace all fgets() calls by readline() to become independent of all existing line length limitations ( #43 )
2017-05-12 17:20:04 +02:00
DL6ER
1654e09eb8
Close file without checking for the pointer (we return early when we cannot open the file)
2017-04-22 01:18:54 +02:00
DL6ER
94bd92a067
Add audit log implementation in FTL (extension to already existing >top-domains and >top-ads commands, use ">top-ads for audit")
2017-04-22 01:05:11 +02:00
DL6ER
e8563acd77
Move memory allocation for woldcard domains into common memory_check() routine
2017-04-12 10:47:30 +02:00
DL6ER
8e19995f2a
Avoid mixing 32bit (int) and 64bit pointers
2017-04-12 10:37:51 +02:00
DL6ER
aa1696060b
Prevent comparison between signed and unsigned variables
2017-04-09 20:48:33 +02:00
DL6ER
5532de60b4
Removed logg_const_str
2017-04-08 18:36:30 +02:00
DL6ER
16a788429b
Removed logg_str
2017-04-08 18:34:37 +02:00
DL6ER
ece9f18c1b
Removed logg_int
2017-04-08 18:27:56 +02:00
DL6ER
7b7983ce3d
Take care that const qualifiers are not unnecessarily castes to pointers
2017-03-16 10:10:35 +01:00
DL6ER
3bb6f423dc
FTL is now aware of how much memory it uses. Added ">memory" command.
2017-03-12 12:16:09 +01:00
DL6ER
9824ba3c2a
Further reduction of scopes of variables
2017-02-27 18:01:17 +01:00
DL6ER
77acf24b08
Reduce scope of some variables
2017-02-27 17:47:31 +01:00
DL6ER
67c48d77ee
Take care to free everything that I allocated before when pihole log is flushed
2017-02-23 17:17:44 +01:00
DL6ER
dd44b4302b
Added wildcard blocking domains list parser
2017-02-23 17:08:42 +01:00
DL6ER
bc72d39453
Show that no blacklist has been found instead of showing "-1" entries
2017-02-13 15:10:08 +01:00
DL6ER
cb8fa5b215
Remove redundant code
2017-02-06 11:15:02 +01:00
DL6ER
68984e354e
Initial upload of the FTL engine
2017-02-02 12:44:45 +01:00